Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DOS Switch Question 1

Status
Not open for further replies.

dschmootz

IS-IT--Management
Oct 30, 2002
100
US
Hi All,

I want to create a batch file that copies all files in C:\folder to F:\folder (F is another PC) as a backup. Should I use "backup" or "copy" and what switch would make it overwrite only changed files? I don't want it to ask me if I want to overwrite. This is what I have in a .bat file:

xcopy c:\folder\*.* f:\folder\*.* /c /h /s /d

Thanks for the help in advance!
DON
 
Thanks Skip. Try ROBOCOPY. I'm using it now. Awesome...
 
I'm a not so technical user but I have tried to use a batch file to use xcopy command for a backup to a usb portable drive. I seems when the directories have names like my documents (two words with a space) the command won't work. do you know if robocopy will copy files and/or folders with titles that have spaces?

thanks for any comments and suggestions.
 
eyeguy1, I've no idea if robocopy will recognise or cope with long file names, but it may copy My Documents as mydocu~1 which is how operating systems like Windows 3.1 would see it...

ROGER - G0AOZ.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top