This is my requirement
1. Schedule a batch program to keep looking in a certian dirctory for files starting with a particular pattern. Files are FTPed from some other system to this directory.
2. Process files satisfying the above selection criteria.
3. For each file do the following:
3.a Make sure files that have completed file tranfer are picked up
3.b Perform a batch command on this file that does some processing
3.c Once the batch command mentioned above has finishes execution, delete the file
The below command does part of my requirements
FOR /F "tokens=*" %%G IN ('dir/b ^"d:\testdir\pattern_*^"') DO d:\soft\load\LOAD d:\testdir\%%G
I think things missed out are
1. ensure I pick only files that have finished file transfer
2. delete files after processing
Please advise.
ASKER