Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

checking the content of files in runtime 1

Status
Not open for further replies.

ajikoe

Programmer
Apr 16, 2004
71
ID
Hello,

I run a program (third party vendor) which writing something in a text files.

My C# program should know if the text program is finished. How can I know if the thread is finished or clossed without checking the keyword in the text files created by the third party vendor).

For example I run the third party vendor using bat files:

Process myP = new Process();
myP.StartInfo.FileName = @"d:\runBat.bat";
myP.Start();
myP.Close();

Then the runBat.bat will run the third party vendor program which will create a text file.

Thanks in advance
ajikoe
 
Process has an EnableRaisingEvents property that can be set so that the process raises an Exited event when it ends. You can look at the other Process properties to get the exit code i.e. to see if it worked properly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top