1.

Solve : Batch file to copy folders + content?

Answer»

Hello all, been searching through posts but can't seem to find an ANSWER to my query which I'm sure some of you will look at and think 'what a wally'. I have basic batch file experience and have studied the Xcopy and Copy help files but still can't figure out a solution. :-?
I have a an XP (multi user) PC which I store data on. I would like a batch file that when ran will copy the folders I want onto a removable USB memory stick. Sounds easy but I can only get Xcopy or Copy to work when the source folder is on the root of the drive whereas in my CASE it in
"D:\docs and settings\my user\my docs\data folder1" It also only copies the contents of the folder itself and not the folder. I know I could just right-click, copy, pastem or use XP wonderful backup wizard thingy but where would all the fun in that be???
Any ideas or websites to lok at would be GREATLY appreciated
Thanks in ADVANCE Have a look into ROBOCOPY perhaps.Ritzdog,

Let's say your removable USB memory stick is in E: then the following should do the trick:

xcopy "D:\docs and settings\my user\my docs\data folder1\*.*" "E:\" /s /y

More copy/xcopy tricks here:
http://dostips.cmdtips.com/DtTipsCopy.php

DOS IT HELP?



Discussion

No Comment Found