Click here to Skip to main content
15,564,470 members
Home / Discussions / C#
   

C#

 
GeneralRe: find files Pin
musefan29-May-09 4:20
musefan29-May-09 4:20 
GeneralRe: find files Pin
michaelgr129-May-09 4:23
michaelgr129-May-09 4:23 
GeneralRe: find files Pin
michaelgr129-May-09 4:25
michaelgr129-May-09 4:25 
GeneralRe: find files Pin
musefan29-May-09 4:32
musefan29-May-09 4:32 
GeneralRe: find files Pin
michaelgr129-May-09 4:50
michaelgr129-May-09 4:50 
GeneralRe: find files Pin
WinSolution29-May-09 5:31
WinSolution29-May-09 5:31 
GeneralRe: find files Pin
I Believe In GOD29-May-09 5:51
I Believe In GOD29-May-09 5:51 
GeneralRe: find files Pin
michaelgr129-May-09 7:06
michaelgr129-May-09 7:06 
Hello,

I tried many ways to do it (as you wrote and another ways) but in all of them it doesn't always find the file i need.
For example if the starting path is the immediate folder that contains the file it works fine and finds the file, but when the starting patch is a higher (maybe 2-3 folder upper) it doesn't find this file (i write exactly the same name).
It seems it doesn't enough time to the program to collect all the files names inside the folder. I did a little delay but it didn't help.

This is my code:

foreach (string d in Directory.GetDirectories(Start_dir))
{
if (!d.Contains("Shared Documents"))
{
System.Threading.Thread.Sleep(200);
foreach (string f in Directory.GetFiles(d))
{
//MessageBox.Show(f);
if (f.Contains(search))
{
Process.Start(f);
review_file_found = true;
return;
}
}
dirsearch(d, search);
}
}
GeneralRe: find files Pin
michaelgr129-May-09 7:14
michaelgr129-May-09 7:14 
GeneralRe: find files Pin
WinSolution29-May-09 7:41
WinSolution29-May-09 7:41 
GeneralRe: find files Pin
michaelgr129-May-09 7:53
michaelgr129-May-09 7:53 
GeneralRe: find files Pin
WinSolution29-May-09 7:59
WinSolution29-May-09 7:59 
GeneralRe: find files Pin
michaelgr129-May-09 8:15
michaelgr129-May-09 8:15 
GeneralRe: find files Pin
michaelgr129-May-09 8:52
michaelgr129-May-09 8:52 
GeneralRe: find files Pin
WinSolution29-May-09 7:57
WinSolution29-May-09 7:57 
Questionsql server 2000 DataBase Backup Pin
Yathish hatter29-May-09 3:16
Yathish hatter29-May-09 3:16 
AnswerRe: sql server 2000 DataBase Backup Pin
Manas Bhardwaj29-May-09 3:25
professionalManas Bhardwaj29-May-09 3:25 
AnswerRe: sql server 2000 DataBase Backup Pin
Satish Pai29-May-09 3:36
Satish Pai29-May-09 3:36 
AnswerRe: sql server 2000 DataBase Backup Pin
I Believe In GOD29-May-09 3:50
I Believe In GOD29-May-09 3:50 
QuestionHow to know when a Message Box has been shown for a form? Pin
The NULL Developer29-May-09 2:52
professionalThe NULL Developer29-May-09 2:52 
QuestionRe: How to know when a Message Box has been shown for a form? Pin
Rajesh R Subramanian29-May-09 2:57
professionalRajesh R Subramanian29-May-09 2:57 
AnswerRe: How to know when a Message Box has been shown for a form? Pin
The NULL Developer29-May-09 3:12
professionalThe NULL Developer29-May-09 3:12 
GeneralRe: How to know when a Message Box has been shown for a form? Pin
Rajesh R Subramanian29-May-09 3:24
professionalRajesh R Subramanian29-May-09 3:24 
GeneralRe: How to know when a Message Box has been shown for a form? Pin
The NULL Developer29-May-09 3:37
professionalThe NULL Developer29-May-09 3:37 
GeneralRe: How to know when a Message Box has been shown for a form? Pin
DaveyM6929-May-09 3:34
professionalDaveyM6929-May-09 3:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.