Click here to Skip to main content
15,881,172 members
Home / Discussions / C#
   

C#

 
GeneralRe: find files Pin
I Believe In GOD29-May-09 4:51
I Believe In GOD29-May-09 4:51 
GeneralRe: find files Pin
michaelgr129-May-09 6:06
michaelgr129-May-09 6:06 
GeneralRe: find files Pin
michaelgr129-May-09 6:14
michaelgr129-May-09 6:14 
GeneralRe: find files Pin
WinSolution29-May-09 6:41
WinSolution29-May-09 6:41 
GeneralRe: find files Pin
michaelgr129-May-09 6:53
michaelgr129-May-09 6:53 
GeneralRe: find files Pin
WinSolution29-May-09 6:59
WinSolution29-May-09 6:59 
GeneralRe: find files Pin
michaelgr129-May-09 7:15
michaelgr129-May-09 7:15 
GeneralRe: find files Pin
michaelgr129-May-09 7:52
michaelgr129-May-09 7: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 6:57
WinSolution29-May-09 6:57 
Questionsql server 2000 DataBase Backup Pin
Yathish hatter29-May-09 2:16
Yathish hatter29-May-09 2:16 
AnswerRe: sql server 2000 DataBase Backup Pin
Manas Bhardwaj29-May-09 2:25
professionalManas Bhardwaj29-May-09 2:25 
AnswerRe: sql server 2000 DataBase Backup Pin
Satish Pai29-May-09 2:36
Satish Pai29-May-09 2:36 
AnswerRe: sql server 2000 DataBase Backup Pin
I Believe In GOD29-May-09 2:50
I Believe In GOD29-May-09 2:50 
QuestionHow to know when a Message Box has been shown for a form? Pin
The NULL Developer29-May-09 1:52
professionalThe NULL Developer29-May-09 1:52 
QuestionRe: How to know when a Message Box has been shown for a form? Pin
Rajesh R Subramanian29-May-09 1:57
professionalRajesh R Subramanian29-May-09 1:57 
AnswerRe: How to know when a Message Box has been shown for a form? Pin
The NULL Developer29-May-09 2:12
professionalThe NULL Developer29-May-09 2:12 
GeneralRe: How to know when a Message Box has been shown for a form? Pin
Rajesh R Subramanian29-May-09 2:24
professionalRajesh R Subramanian29-May-09 2:24 
GeneralRe: How to know when a Message Box has been shown for a form? Pin
The NULL Developer29-May-09 2:37
professionalThe NULL Developer29-May-09 2:37 
GeneralRe: How to know when a Message Box has been shown for a form? Pin
DaveyM6929-May-09 2:34
professionalDaveyM6929-May-09 2:34 
GeneralRe: How to know when a Message Box has been shown for a form? Pin
The NULL Developer29-May-09 2:40
professionalThe NULL Developer29-May-09 2:40 
GeneralRe: How to know when a Message Box has been shown for a form? Pin
Dave Kreskowiak29-May-09 4:09
mveDave Kreskowiak29-May-09 4:09 
GeneralRe: How to know when a Message Box has been shown for a form? Pin
The NULL Developer2-Jun-09 1:42
professionalThe NULL Developer2-Jun-09 1:42 
GeneralRe: How to know when a Message Box has been shown for a form? Pin
Dave Kreskowiak2-Jun-09 1:47
mveDave Kreskowiak2-Jun-09 1:47 
AnswerRe: How to know when a Message Box has been shown for a form? Pin
Dave Kreskowiak29-May-09 2:00
mveDave Kreskowiak29-May-09 2:00 
QuestionC# Articles & Ruler Pin
Baeltazor29-May-09 1:34
Baeltazor29-May-09 1: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.