in reply to Monitor Folder, Wait for Upload?

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; }

All dogma is stupid.