In Xcopy, the switches go at the end of the command line, like this:
Xcopy "C:\junk\*.*" "D:\junk\" /s /y
That line will copy everything in the junk folder in C: to a junk folder in drive D:.
You must first make the "junk" folder on D: for this to work properly.
Does that make sense?
Every day, I back up my entire "My Documents" folder (and several others) to a like folder on drive D:
The way I have it written, the first time I ran the batch file, it backed up the entire directory, but the next time I ran it, it backed up only new files and files that had been updated or changed.
Now I run it in my shutdown batch file and it backs up just a few files and takes only a few seconds to run.
Here's the text of that shutdown batch file:
@Echo off
cls
xcopy "C:\Documents and Settings\Alex\My Documents\*.*" "D:\My Documents\" /s /y /H /R /D
Rem Back up my WordPerfect files.
xcopy "C:\MyFiles\*.*" "D:\MyFiles\" /s /y /H /R /D
Rem Back up all the files for My Web Page.
xcopy "C:\My web page\*.*" "D:\My web page\" /s /y /H /R /D
Rem Back up my email folders and address book.
xcopy "C:\Documents and Settings\Alex\Local Settings\Application Data\Identities\{CC1A6FC7-0D07-4169-865D-56EBDD76EB8B}\Microsoft\Outlook Express\*.dbx" "D:\MyEmailFiles-Backup\" /s /y /H /R /D
xcopy "C:\Documents and Settings\Alex\My Documents\My Address Books\*.*" "D:\My Address Books" /s /y /H /R /D
Rem When the backup is done...Shutdown!
%windir%\System32\shutdown.exe -s -t 00 -f
In your example, you will be copying all the files in those folders, over and over again.
That's pointless and very time consuming.
I suggest that you add more switches like I've done, to copy only new or changed files.
Just a suggestion,
Shadow