How do you know that the file has finished being written before you start copying it? In such situations, I usually recommend that you have a standardized naming convention for "still writing to the file" like "*.tmp" and then have whatever process is writing the file rename it to remove the ".tmp" after it is finished writing it.
If after you have (already?) solved the above concern, the "text file busy" problem (besides causing me to research what that error really means which might even lead me to reading OS source code) would lead me to detecting move() failing and leaving $! set to ETXTBUSY (from Errno) and then just sleeping and retrying a couple of times.
- tye
In reply to Re^3: Random script crashes related to File::Copy (care)
by tye
in thread Random script crashes related to File::Copy
by michael.barnes
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |