Robocopy batch file help

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

Just wondering if someone can help me out, i have created a batch file with robocopy, i want to use it to backup my itunes music folder. The little problem i am having is i cant seem to get robocopy to show me the list of files that will be copied. I understand its the /L switch but i doesn't actually list the files. On the other hand XCOPY does this which is really quite annoying it gives me the whole list of files, the whole idea of me using robocopy was to use the /MIR switch as this does not exsist on xcopy. I just want to see what files are going to be copied before i hit enter. Im sure you might think if xcopy does what you want use that lol your right but the problem with xcopy is if you modify a file then run the batch file it will copy it over no problem but it wont overwrite the original file already at the destination source. So you end up with the same file twice, where as robocopy actually mirrors the source with the destination and will overwrite the file if its seen that it has changed. Hope i dont sound confusing :)

I have put my file below if anyone could help me out i would be so gratefull.

@Echo OFF
ECHO WELCOME TO LIAM'S BACKUP WIZARD

GOTO MENU
:MENU
ECHO PLEASE SELECT A COMMAND BELOW BY PRESSING NUMBERS 1-4 FOR THE ITEMS THAT YOU WISH TO BACKUP

ECHO 1. iTUNES MUSIC BACKUP
ECHO 2. MY PICTURES BACKUP
ECHO 3. MY DOCUMENTS BACKUP
ECHO 4. QUIT

SET /P N=TYPE 1, 2, 3 OR 4 THEN PRESS ENTER:
IF "%N%"=="1" GOTO iTUNES
IF "%N%"=="2" GOTO MY PICTURES
IF "%N%"=="3" GOTO MY DOCUMENTS
IF "%N%"=="4" GOTO QUIT
:iTUNES
ECHO YOU HAVE CHOSEN TO BACKUP THE iTUNES MUSIC FOLDER PRESS ENTER TO CONTINUE
PAUSE
ECHO THE FOLLOWING FILES WILL BE COPIED
ECHO >> "I:\Liam\XCOPY Backup Files\iTunes Music\BACKUP LOG.TXT"
ECHO ------------------------------- >> "I:\Liam\XCOPY Backup Files\iTunes Music\BACKUP LOG.TXT"
ECHO %DATE% %TIME% >>"I:\Liam\XCOPY Backup Files\iTunes Music\BACKUP LOG.TXT"
ECHO ------------------------------- >> "I:\Liam\XCOPY Backup Files\iTunes Music\BACKUP LOG.TXT"
ROBOCOPY "E:\Music\iTunes\iTunes Media\Music" "I:\Liam\XCOPY Backup Files\iTunes Music" /L
PAUSE
ROBOCOPY "E:\Music\iTunes\iTunes Media\Music" "I:\Liam\XCOPY Backup Files\iTunes Music" /MIR >> "I:\Liam\XCOPY Backup Files\iTunes Music\BACKUP LOG.TXT"
ECHO FILE COPY COMPLETE
GOTO MENU
 
Last edited:
Mate, thanks so much i cant believe i actually missed something so stupid!! It really plays with your mind these batch files you need another pair of eyes to see where you go wrong!!! Thanks a million mate :D
 
i do mate :). I wanted to try creating a batch file just as a secondary backup but i always use sync toy for everything a fab little app
 
Back
Top Bottom