Can you help me with scripting to identify duplicate filenames in 3 folders?

Mizugori

[H]ard|Gawd
Joined
Mar 25, 2004
Messages
1,240
I have 3 folders, with a ton of PDF files in each.

We need to try to create a file / list of duplicates. (Assume duplicate filename = duplicate, don't need to examine the inside of the documents.)

I did some searching and found the following suggestion was given to someone else on stackoverflow years ago for a similar problem:

Code:
xcopy "<source>" "<dest>" /e /l /f >\fullList.txt

xcopy "<source>" "<dest>" /e /l /u /f >\equals.txt


Without much context, I tried creating a batch file containing this and just filled in the source and dest directories for folder 1 of the 3 we need to do. Then I added one line with pause after the two xcopy lines.

When I run it, it takes a little but then finishes and gets to the "press any key" prompt. However, no text file/s were created.

Can anyone help me? Either by correcting whatever I'm doing wrong above, or presenting an alternative - any help would be greatly appreciated!
 
For de-duping on my home PC - I use a freeware tool called AllDup - I use the portable version which doesn't require an installation.
http://www.alldup.de/en_download_alldup.php

It can search for duplicates based on multiple criteria and can export the results to Text file.
I probably have multiple scripts floating around for doing similar tasks - either Powershell or Vbscript (and probably AWK too), but AllDup is a nice tool that does what is says and is easy to use.

Start with that as a suggestion and if you really want to script something - then start with Microsoft's Script Repository.
https://gallery.technet.microsoft.com/scriptcenter/

For the script repository - use keyword searches and language to narrow things down and also the Category - which I suggest is going to be "files" or "folders" - which are in the Storage category.

So that's a couple of easy solutions...
 
For de-duping on my home PC - I use a freeware tool called AllDup - I use the portable version which doesn't require an installation.
http://www.alldup.de/en_download_alldup.php

It can search for duplicates based on multiple criteria and can export the results to Text file.
I probably have multiple scripts floating around for doing similar tasks - either Powershell or Vbscript (and probably AWK too), but AllDup is a nice tool that does what is says and is easy to use.

Start with that as a suggestion and if you really want to script something - then start with Microsoft's Script Repository.
https://gallery.technet.microsoft.com/scriptcenter/

For the script repository - use keyword searches and language to narrow things down and also the Category - which I suggest is going to be "files" or "folders" - which are in the Storage category.

So that's a couple of easy solutions...

Thanks for recommending AllDup. This is fantastic.
 
Back
Top