0

I am running a command line argument from code behind that runs an executable. The problem is the executable is supposed to create a csv file from a binary file which works fine except i need to move the file when the process is finished. The question i have is how to know when the process finishes. Any ideas would be much appreciated.

System.Diagnostics.Process.Start(hexFilePath, filepath + " B");//This creates csv

Need to have some sort of mechanism here to wait till Process is finished.

File.Move(filepath, archiveDirectory);//This is where i move the binary file to archive
Maxqueue
  • 2,194
  • 2
  • 23
  • 55

1 Answers1

2
var p = Process.Start((hexFilePath, filepath +" B");//This creates csv
p.WaitForExit();
Flat Eric
  • 7,971
  • 9
  • 36
  • 45