Find files with duplicate name but different content in 2 different folders, rename automatically & combine in 1 folder?

jimmyhaha

Platinum Member
Jan 7, 2001
2,851
0
0
Any software to find files with duplicate name but different content in 2 different folders, rename automatically & combine in 1 folder ?

pls advice.

Thanks in advance
 

atom

Diamond Member
Oct 18, 1999
4,722
1
0
..cut and paste, and click yes to all when it asks you to overwrite. :p
 

Marshallj

Platinum Member
Mar 26, 2003
2,326
0
76
Originally posted by: jimmyhaha
..cut and paste, and click yes to all when it asks you to overwrite

Automated solution needed b4 my finger give up clicking...

Don't just select "yes", select "yes to all".

You'll only have to click it once.
 

anxman69

Senior member
Jun 27, 2001
635
1
0
If I had to solve this problem, I would do it as follows:

c:\1> dir /b > 1.txt
c:\2> dir /b > 2.txt

This will give you the two lists of files in each folder. Now take these two lists, and upload them to your favorite unix shell. Perform a diff command to compare the two files, output it to a file. Then examine that file to see exactly which files are not shared by each folder and go from there.

It saves the manual labor involved with figuring out which file names are shared by each folder.

-Ankur
 

jimmyhaha

Platinum Member
Jan 7, 2001
2,851
0
0
problem is that I don't want to overwirte ANY write.

I want to find those duplicate, move them into another folder so I can inspect the file manually...

Don't just select "yes", select "yes to all".

You'll only have to click it once.

And Yes, I know this can be done easily in *nix with command line, but I have no access to any *nix..
 

atom

Diamond Member
Oct 18, 1999
4,722
1
0
Well if you need to keep the dupes there are plenty of freeware/shareware progs that will find duplicate files for you (look up "find duplicate files" in google). The combining of directories you'll still have to do manually.
 

Jzero

Lifer
Oct 10, 1999
18,834
1
0
You might be able to use some variant of FOR in a batch file.

like maybe batch1.bat would say:
FOR /F %%i IN ('dir /b /s <target directory>') DO CALL <batch2.bat> %%i

And batch2.bat would say:
FOR /F %%i IN ('dir /b /s <target directory>') DO IF %%i == %%1 GOTO found

:notfound
exit
:found
{copy matched files to destination and quit}



You'd have to do some bungling around to get the full file paths and such, but I think the all-powerful FOR /F is the key...
 

GermyBoy

Banned
Jun 5, 2001
3,524
0
0
Make a batch file which will do this for you, and will recurse to every subdirectory in your computer. I did it back in the day with an 80MB harddrive, which I was never ever going to use up, yet I did. Took about 2 hours then.