I have a folder that receives xml files from an external service.
I have to read, process and move each file.
I reload an .asp webpage once a second.
I want to make sure I don't pick up a file that's in the middle of being created.
Right now I use this code to choose one file, but I know it is not correct:
for each x in fo.files
PrimerFile = x.name
if loopnum=1 then exit for
Picking up the older file is an aproach, but if I only have 1 file it can fail.
I would prefer to pick up files that are 2 seconds old (since saved to the disk), for example.