Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
If some other process is moving files into a directory, just because a file exists in a directory does not mean it is complete and ready for processing by a different program.
On my processes that do something like that, first I assume I will never have to work with a zero byte file. Then after I get the file name, before I process it I check the file size with the FileSize function (and NOT the FileSizeEX function). If the FileSize function reports 0 then the file is not yet ready for processing. So, depending on the program, I either wait a few seconds then check again, or skip the file until the next pass sometime later.
Finally, I recommend adding some code to check that the destination file does not already exist, and if it does make sure its not in-use (FileExist will return 2 if in-use), then delete it (FileDelete).
Article ID: W15941
File Created: 2004:03:30:15:41:48
Last Updated: 2004:03:30:15:41:48