Filename, filename(1), filename(2), filename(3)
April 29, 2012 7:22 PM   Subscribe

Help me delete duplicate files on an an eternal HD used to back up a Windows 7 laptop.

I back up my laptop from time to time onto an external HD using iomega quikprotect (sic).

Not sure how this happened, but my backup drive contains 4 copies of every document, photo, etc. They are named, for example, photoname, photoname(1), photoname(2) and photoname(3).

How can I get back to having only one copy of each document and photo on my external drive?
posted by lulu68 to Computers & Internet (5 answers total) 5 users marked this as a favorite
I like Doublekiller for finding and deleting duplicate files. No bells and whistles, but it gets the job done.
posted by xmts at 7:37 PM on April 29, 2012

Two strategies, depending on how many unique files are involved.

1) If the number of unique files is around 50 or less, use Teracopy free version to CUT and PASTE the files from each directory into one everything directory. If the filenames are the same, Teracopy will show the exact filesize of the two file pairs one by one as it pastes, and you can "Skip" each file that is the same, then when Teracopy is finsihed you can delete those left behind duplicate files from the source directory.

2) If the number of unique files is around 50 or more, use Teracopy to CUT and PASTE the files from each directory into one everything directory, and choose the "Rename All" option. Then use Doublekiller free version on that everything directory - Doublekiller will select exact duplicate files regardless of the filename, you can review the selection, then delete the duplicates all at once.
posted by caclwmr4 at 7:38 PM on April 29, 2012

You could use a shell script using something like Cygwin and something like (I can refine and test this if you want, but let me know as it will take a bit) "rm *(*)" However, if you don't k now the command line, a prewritten tool is probably easier.
posted by Canageek at 7:39 PM on April 29, 2012

If the duplicate files are all named as above, then it is trivial to scan through a folder to pull out duplicates with the command line. Here is a one liner in Powershell, which you can find in your start menu:

Get-ChildItem -Recurse -Filter "*(?).*" -Path "D:\ExampleDirectory" | Remove-Item -Whatif

This is searching for files that look like "Something(1).any". The -Whatif means it is a dry run, if you delete that part it will delete stuff for reals.
posted by tracert at 7:54 PM on April 29, 2012

Ah MetaFilter - less than an hour. Thanks!

And thanks Canageek for your offer to help.
posted by lulu68 at 8:02 PM on April 29, 2012

« Older Help me identify the names of these three movies.   |   Does my cat have stomatitis? Newer »
This thread is closed to new comments.