If you're on *NIX you can use the lsof utility to see whether there is an active process still writing to the file. For example, to wait until the file is not being accessed anymore:
while (`lsof filename` =~ m/upload\.cgi.*?\s\d+w\s/) { sleep 10; }
In reply to Re: Monitor Folder, Wait for Upload?
by tirwhan
in thread Monitor Folder, Wait for Upload?
by ecuguru
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |