Click here to Skip to main content
15,559,758 members
Home / Discussions / C#
   

C#

 
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 
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 
Hi,
The code you sent me works fine, but very very slow. My code works much faster:

foreach (string d in Directory.GetDirectories(Start_dir))
{
if (!d.Contains("Shared Documents") && !d.Contains("Anna") && !d.Contains("CE Group") && !d.Contains("DEF") && !d.Contains("DtReport")
&& !d.Contains("images") && !d.Contains("Lists") && !d.Contains("MMGBD") && !d.Contains("Site") && !d.Contains("SP Requests")
&& !d.Contains("STAM") && !d.Contains("Training") && !d.Contains("uptest") && !d.Contains("X5") && !d.Contains("X8")
&& !d.Contains("Form") && !d.Contains("Yonah"))
{
//System.Threading.Thread.Sleep(200);
foreach (string f in Directory.GetFiles(d))
{
//System.Threading.Thread.Sleep(200);
//MessageBox.Show(f);
m=f.Replace("\\"+"\\moss.ger.ith.intel.com\\sites\\MPGBD-03\\HAL\\PD\\","");
//MessageBox.Show(m);
if (m.Contains(search1))
{
MessageBox.Show("found");
//System.Net.WebClient client = new WebClient();
//client.UseDefaultCredentials = true;
//client.DownloadFile(f, @"c:\\123.gif");
//Process.Start(@"c:\\123.gif");


//System.Threading.Thread.Sleep(500);
//Process.Start(f);
review_file_found = true;
return;
}
}
dirsearch(d, search1);
}
}

The problem is that with this code (with the messagebox.show("found")
it finds the file (the message appears).
But when i usethe process.start and try to open the file or even to download it it seems as it doesn't see the file at all (some files it sees and some not). It seems as it doesn't enter the if condition at all (even don't do the -
review_file_found=true
because outside this method i check the status of the bool and show a messagebox says the file not found. But the program does find it if i don't do the process.start

Maybe i need to use another way to open the file?

Here is an example of the file path:
\\moss.ger.ith.intel.com\sites\MPGBD-03\HAL\PD\Puma M Reviewd FIB edits\002_pumam_b0_flsh2.GIF
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 
GeneralRe: How to know when a Message Box has been shown for a form? Pin
The NULL Developer29-May-09 3:40
professionalThe NULL Developer29-May-09 3:40 
GeneralRe: How to know when a Message Box has been shown for a form? Pin
Dave Kreskowiak29-May-09 5:09
mveDave Kreskowiak29-May-09 5:09 
GeneralRe: How to know when a Message Box has been shown for a form? Pin
The NULL Developer2-Jun-09 2:42
professionalThe NULL Developer2-Jun-09 2:42 
GeneralRe: How to know when a Message Box has been shown for a form? Pin
Dave Kreskowiak2-Jun-09 2:47
mveDave Kreskowiak2-Jun-09 2:47 
AnswerRe: How to know when a Message Box has been shown for a form? Pin
Dave Kreskowiak29-May-09 3:00
mveDave Kreskowiak29-May-09 3:00 
QuestionC# Articles & Ruler Pin
Baeltazor29-May-09 2:34
Baeltazor29-May-09 2: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.