4
1
I'm on Windows 7 Professional, and this is my scenario :
Folder "Asd" (C:\) Folder "Asd" (D:\)
File 1 File 1
File 2 File 3
File 3 File 4
File 4
File 5
I'd like to select the folder on C:\ (without selecting each single file, of course) and copy it over the same folder on D:. Usually, it will copy all files. But what I'm looking for is to copy only files (from C:) that are contained on folder d:.
So in my case I'd like to replace only File 1, File 3 and File 4. File 2 and File 5 must be ignored.
Is it possible?
OH! With GUI is it not possible? – markzzz – 2012-02-06T09:08:25.403
@Markzz, no I don't think so. Oldskool, shouldn't that be "FOR /F %X IN ('dir /b D:\Asd')..." ? – RJFalconer – 2012-02-06T09:13:13.530
@markzzz Ah, didn't realize it had to be a GUI solution. Windows doesn't have that kind of functionality by default, you'd probably have to look for a custom piece of software that does that if command-line is not an option. – Oldskool – 2012-02-06T09:14:10.143
@RJFalconer You are right! Updated the answer, thanks. – Oldskool – 2012-02-06T09:14:58.083
@markzzz I think that the tool Total Commander does have a directory comparison function that you could use for this.
– Oldskool – 2012-02-06T09:20:35.297@Oldskool - I would make a little change:
FOR /F %X IN ('dir /b D:\Asd') DO
if exist "C:\Asd%X"copy "C:\Asd\%X" "D:\Asd\%X"
to prevent trying to copy files that don't exist on C: but do exist on D: – Kevin Fegan – 2012-11-28T19:06:55.017