Advice on batch script

Soldato
Joined
23 Mar 2007
Posts
2,553
Location
Essex
Evening all

Just looking for some advice on a batch script i am making to backup my movie collection, i'll post below what i have so far

ECHO THE FOLLOWING FILES WILL BE COPIED
XCOPY "D:\My Movies" "F:\My Movies" "\\LIAM-MEDIA\Backup Drive\Movies" /L /D /Y /S
TIMEOUT /T 5
XCOPY "D:\My Movies" "F:\My Movies" "\\LIAM-MEDIA\Backup
Drive\Movies" /S /D /Y

The script worked fine when i only had 1 directory that i was copying from, i added a new HD and created the same folders on them as the previous drive which is why there are 2 "My Movies" locations

It oesnt like the fact of the 2nd directory i have added have i done this wrong? Hope someone could shed some light

Cheers guys
 
Thanks for that mate i though that might be the case, your right the way its setup is 2 source and 1 target. I'll just get the 2nd source to run striahgt after the 1st source has been copied

Thanks again mate
 
Cheers for all your help guys, might look to robocopy in the future but always find myself using xcopy for some odd reason. Here is the final script, its a little overkil for what it actually does but it flows nice so i can see whats going to be copied etc before hand

@Echo OFF

ECHO -------------------------------------
ECHO WELCOME TO THE MEDIA BACKUP WIZARD
ECHO -------------------------------------
TIMEOUT /T 5

ECHO ----------------
ECHO MY PICTURES BACKUP
ECHO ----------------

ECHO THE FOLLOWING FILES WILL BE COPIED
XCOPY "D:\PICTURES" "\\MEDIA\Backup Drive\PICTURES" /L /D /Y /S
XCOPY "D:\PICTURES" "\\MEDIA\Backup Drive\PICTURES" /S /D /Y
ECHO.

ECHO THE FOLLOWING FILES WILL BE COPIED
XCOPY "F:\PICTURES" "\\MEDIA\Backup Drive\PICTURES" /L /D /Y /S
XCOPY "F:\PICTURES" "\\MEDIA\Backup Drive\PICTURES" /S /D /Y
ECHO.

ECHO ---------------------
ECHO MY MUSIC BACKUP
ECHO ---------------------

ECHO THE FOLLOWING FILES WILL BE COPIED
XCOPY "D:\MY MUSIC" "\\MEDIA\Backup Drive\MY MUSIC" /L /D /Y /S
XCOPY "D:\MY MUSIC" "\\MEDIA\Backup Drive\MY MUSIC" /S /D /Y
ECHO.

ECHO THE FOLLOWING FILES WILL BE COPIED
XCOPY "F:\MY MUSIC" "\\MEDIA\Backup Drive\MY MUSIC" /L /D /Y /S
XCOPY "F:\MY MUSIC" "\\MEDIA\Backup Drive\MY MUSIC" /S /D /Y
ECHO.
 
Last edited:
Back
Top Bottom