Batch scripting is a text file containing a series of commands intended to be executed by the command interpreter. Much like a unix / linux shell script, the purpose of a batch script is to sequentially process a series of commands.
So you already know that you can use xcopy /u to copy files that already exist, but what about files that DONT already exist. In this scenario you are trying to copy only new files using a bat script.
It's actually not too hard at all, just use the /d switch when using xcopy. The /d switch will limit copy operations to a date but if you dont specify any date it will just grab any newer files and wont overwrite the older files, here is what it would look like if you were trying to move from a backup to a partial restore directory
In the example above I tell the xcopy command to only copy new files, including empty directories (/s), we are going to overwrite any read only files (/r) and we are not going to be prompted to overwrite an existing file (/y).
Feel free to leave a comment or question
Code block comments
2010-03-19
Added a code block for comments
Windows 7 Items
2009-09-24
new info on windows 7
Snort on Debain Lenny
2009-08-19
Installing snort+PGSQL on Debian