So you say that once a day:
- you need to copy media files over to your server,
- convert them to another format,
- delete these that were processed,
- then on the next day you just want to ignore the files that were processed already.
I've got an idea: instead of deleting files that were already converted, you can just create a script that will replace processed files with empty files with the same names. Then you just need the proper switch that will ignore all files present in your server, and only copy new files to it. That way you won't need to edit each day your batch file and it will work on it's own every day without any mod.
for XCOPY, use the switch /d (without any date) to ignore files that are already present in the destination and date is newer than source (which is the case if you created empty files after conversion)
for ROBOCOPY to do the same, use /xo
EDIT: oh well I don't know how to do a script that will replace all files within a folder with empty ones... guess it's not much help there... :-(
EDIT2: You can delete the content of a file with the command:
Code:
copy nul "C:\test\test.txt"
but you cannot do a command like:
You can create empty files using:
Code:
type nul>"C:\test\test.txt"
but you cannot do that:
You can use "forfiles" to do a command for every files it finds, but the "copy nul" command does not work within it...
Screw command prompt it's no use when you want it to be very specific...