in reply to Check if file is written by other process
The technique I find best in that situation is to generate your file using an intermediate filename, and rename it to the final name only after you've finished writing it. That way, the program that processes the files can simply look for the final file name(s). You can use a temporary directory and rename the file into the production directory, a different base name or a different extension.
If you can't modify the program that generates the file, then write a wrapper script that will execute the program and then rename the file after the program completes.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Check if file is written by other process
by techman2006 (Beadle) on Jul 06, 2014 at 14:02 UTC |