LPRun.exe . . . . how to tell if process finished
Options
"C:\Program Files (x86)\LINQPad5\LPRun.exe" -format=csv C:\Users\Me\LinqPadDemo\GetData.linq > OutputData.csv
In the above example, a script is executed and data is dumped out as a csv file. The file can take several minutes to output. Once the data is written to file, I then import it into a database.
Is there are way of telling if the file has been completely written so that I avoid any chance of attempting to import the data while the file is incomplete?
Hope that makes sense!
In the above example, a script is executed and data is dumped out as a csv file. The file can take several minutes to output. Once the data is written to file, I then import it into a database.
Is there are way of telling if the file has been completely written so that I avoid any chance of attempting to import the data while the file is incomplete?
Hope that makes sense!
Comments
-
LPRun is supposed to execute synchronously. So when the command finishes, the csv file should be ready. Is it behaving differently?
-
You could export to a temp file and rename the file afterwards.
LPRun.exe -format=csv GetData.linq > OutputData.csv.temp move OutputData.csv.temp OutputData.csv /y