Here is the situation: I have a group of files that are dropped daily into a network folder. Lets call them DataFile_091509_A.xls, DataFile_091509_B.xls, and DataFile_091509_C.xls. I need to copy these files into an archive folder within the folder where these files are dropped, then move them to a local folder, while renaming them to a standard filename, ex DataFile_A.xls, DataFile_B.xls, DataFile_C.xls. I will overwrite the destination file names each day so that it inlcudes the most recent data.
Here is what I have so far:
REM Copy all datafiles into the Archive folder
copy "\\PATH\*A.xls" "\\PATH\Archive" /y
copy "\\PATH\*B.xls" "\\PATH\Archive" /y
copy "\\PATH\*C.xls" "\\PATH\Archive" /y
REM Move A
move /y "\PATH\*A.xls" "c:\DataFile_A.xls"
REM
REM Move B
move /y "\PATH\*B.xls" "c:\DataFile_B.xls"
REM
REM Move C
move /y "\PATH\*C.xls" "c:\DataFile_C.xls"
REM
REM
Now, this works just fine, but have I allowed enough room for error? Should I include something in my MOVE that will only move the most recent version of the file in case something goes wrong the day before and files are not moved properly?
Any other alternatives?
PK