ROBOCOPY help.. Please

Soldato
Joined
19 Oct 2002
Posts
6,981
Location
Bath
Hi guys i have been using robocopy to backup to my external drive array with no problems for months now and have never had a problem with it.

My problem lies with copying specific folders, or in fact using a right-click >sendto cmd file that looks like this

Code:
@echo off
robocopy %1 k:\music\ /S /E /Z /XF *.jpg /XF *.ini /XF *.db
exit

what this should do is copy the folder selected and right clicked and copy it to k:\music\ (k: is my phones mem card) only problem is that it is not recreating the directory structure, just dumping the files in the music folder on k: other than that it works fine.

I need the directory structure for the player on the phone to detect artist and album.

Can anyone help please what am i missing? any ideas?
 
if the %1 = "d:\music\aspects\" it will copy the files within the Aspects folder to the k:\music\ folder but not make the folder Aspects on the target directory and put the files in it. does that make any more sense?

drag and drop is no problem and am currently using terracopy but would rather use robocopy.
 
nope that dont work either :(

It does and it doesn't all it gives me is the music folder and not the artist folder aswell :(
 
Last edited:
Ladys and Gentlemen we have cracked it :)

Code:
@echo off
set current=%1
set target="K:\%current:~3%
if not exist %target%\nul" md %target% 
robocopy %1 %target%\ /S /Z /ETA /XF *.jpg /XF *.ini /XF *.db
echo.
echo There must be a simpler way to do this!
pause
exit

job done thanks for your help guys it works just fine now.
 
Last edited:
yep works for both now mate :) thanks for your help. Am so glad i got an 8gb mem card for my phone instead of another mp3 player :)
 
Back
Top Bottom