Batch: copy files without replacing them

Solved
satan14 -  
satan14 Posted messages 47 Status Member -
Hello,
I'm currently trying to create a .bat file that allows me to copy music from my computer to my laptop with a single click!

 CD C:\Users\xxx\Music\musique cls COPY /Y *.mp3 H:\music\musique 


But it copies all the files, including those I already have, so I would like to know if it's possible to include a command that only copies files that do not exist on my laptop??

Thanks in advance (P.S.: I'm on Vista)
Configuration: Windows Vista Firefox 2.0.0.12

5 answers

JPC
 
The command I gave you only copies files that do not exist in H:.....

If there are no subdirectories, it becomes:

xcopy /H /R /Y /D *.mp3 H:\music\musique

I recommend checking the help for the command: xcopy /?
2
dubcek Posted messages 18627 Registration date   Status Contributor Last intervention   5 659
 
hello
use a synchronization software, e.g.: http://www.commentcamarche.net/telecharger/telecharger 177 syncback
0
JPC
 
You can also replace your COPY command with:

xcopy /E /S /H /R /Y /D *.mp3 H:\music\musique

Xcopy can also copy files contained in subdirectories using the /E /S switches

Help on the XCOPY command:
In a DOS command window: XCOPY /?
0
satan14 Posted messages 47 Status Member 15
 
I'm not really looking for that, because I just want the command(s) to avoid replacing the files!!

For xCopy, it won't do anything more, all my music is in the same folder and there are no subfolders, but isn't there a command with "if" for the condition like, if it sees the file, it doesn't copy it and if it doesn't see it, it copies it??
0
satan14 Posted messages 47 Status Member 15
 
It's good!!

Thank you, I think it's working ^^
0