Finding duplicates, while ignoring sequentially suffixed numbers

Discussion related to "Everything" 1.5.
Post Reply
Charm900
Posts: 5
Joined: Mon Dec 17, 2018 12:30 pm

Finding duplicates, while ignoring sequentially suffixed numbers

Post by Charm900 »

I have successfully been using the following command to find folders containing duplicate files on my hard drive:

<drive letter>: dupe:name,size,parentname

However, I’ve encountered a challenge with "sequential duplicates"—files that are identical but have suffixed numbers (common when downloading files multiple times or merging folders). For example:

filename.ext

filename (1).ext

filename (2).ext

How can I modify the <drive letter>: dupe:name,size,parentname command to identify these as duplicates? Essentially, I need the search to ignore sequential numbering like (1), (2), etc., while still matching the rest of the filename, size, and location.
void
Developer
Posts: 19870
Joined: Fri Oct 16, 2009 11:31 pm

Re: Finding duplicates, while ignoring sequentially suffixed numbers

Post by void »

Please try a regex capture to remove the trailing (#):

Code: Select all

<drive letter>: regex:stem:^(.*?)(\s\(\d+\))?$ addcolumn:1 dupe:1;extension;size;parentname
regex: = enable regular expressions.
stem: = match the basename without extension
^ = match the start of the filename.
(.*?) = lazy capture text
(\s\(\d+\))? = optionally check for " (one or more digits)"
$ = match the end of the filename.
addcolumn:1 = show the capture in the regmatch1 column. (optional)

In your dupe function call, make sure to check the extensions are the same
anmac1789
Posts: 745
Joined: Mon Aug 24, 2020 1:16 pm

Re: Finding duplicates, while ignoring sequentially suffixed numbers

Post by anmac1789 »

Charm900 wrote: Sat Feb 28, 2026 9:44 pm I have successfully been using the following command to find folders containing duplicate files on my hard drive:

<drive letter>: dupe:name,size,parentname

When you use , (comma) does that work instead of ; semicolons?
void
Developer
Posts: 19870
Joined: Fri Oct 16, 2009 11:31 pm

Re: Finding duplicates, while ignoring sequentially suffixed numbers

Post by void »

;
and
,
can be used as separators for property lists.
Charm900
Posts: 5
Joined: Mon Dec 17, 2018 12:30 pm

Re: Finding duplicates, while ignoring sequentially suffixed numbers

Post by Charm900 »

void wrote: Sat Feb 28, 2026 9:59 pm

Code: Select all

<drive letter>: regex:stem:^(.*?)(\s\(\d+\))?$ addcolumn:1 dupe:1;extension;size;parentname
Thank you for the quick and effective solution, Void! This is extremely useful. I used the following modification to find multiple duplicates caused by repeated downloads and merged folders.

While the regex doesn't target sequentially numbered files specifically, it excels at finding duplicates with significant overlap in the filename. It works fantastically for me, as it also catches duplicates that might be truncated rather than numbered.

Code: Select all

[<drive letter>:  regex:^(.*?)(\s\(\d+\))?\.(.*)$  dupe:regmatch1,regmatch3,size,path,extension 
Post Reply