Mark duplicates not in any subfolder

A place to try and solve your RegEx problems.
Post Reply
dvanon
Posts: 1
Joined: Wed Apr 13, 2016 8:18 pm

Mark duplicates not in any subfolder

Post by dvanon »

How do I mark for deletion those files in "C:\Users\username\Documents\" that are also found in any of the subfolders in "C:\Users\username\Documents\AnySubfolder\"

I have about 100 "Documents" subfolders so I don't want to run a separate search for each subfolder individually.

So if the Scan finds "file.abc" in any subfolder of "Documents", that file should be preserved, while the same "file.abc" in the top level "Documents" folder should be marked for deletion.

I think this might require a regular expression, I'm not sure.

I hope that's clear, thanks for any help.
User avatar
DigitalVolcano
Site Admin
Posts: 1717
Joined: Thu Jun 09, 2011 10:04 am

Re: Mark duplicates not in any subfolder

Post by DigitalVolcano »

You can do this from the selection assistant in Duplicate Cleaner 4.0

Mark by Location->"Mark files in this folder that have duplicates elsewhere" with the Subfolders option OFF.

From the manual:
This button will mark all files inside the selected folder/tree which have duplicates outside the folder/tree.

If the 'Preserve' option is checked then duplicates of files inside the selected folder/tree which are outside will be un-marked.

Example:
Selected folder name = C:\MyFiles\

Files in Group 1:
C:\MyFiles\file1.txt
D:\Backup\file1.txt
D:\Backup\copies\file1-copy.txt

Files in Group 2:
C:\MyFiles\Doc.txt
C:\MyFiles\Doc (2).txt
D:\Backup\Doc.txt
D:\Backup\copies\Doc.txt

After this operation the files in the MyFiles (selected) folder are marked:

Files in Group 1:
C:\MyFiles\file1.txt - MARKED
D:\Backup\file1.txt
D:\Backup\copies\file1-copy.txt

Files in Group 2:
C:\MyFiles\Doc.txt - MARKED
C:\MyFiles\Doc (2).txt - MARKED
D:\Backup\Doc.txt
D:\Backup\copies\Doc.txt
Post Reply