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.
Finding duplicates, while ignoring sequentially suffixed numbers
Re: Finding duplicates, while ignoring sequentially suffixed numbers
Please try a regex capture to remove the trailing (#):
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
Code: Select all
<drive letter>: regex:stem:^(.*?)(\s\(\d+\))?$ addcolumn:1 dupe:1;extension;size;parentname
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
Re: Finding duplicates, while ignoring sequentially suffixed numbers
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?
Re: Finding duplicates, while ignoring sequentially suffixed numbers
;,Re: Finding duplicates, while ignoring sequentially suffixed numbers
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.void wrote: Sat Feb 28, 2026 9:59 pmCode: Select all
<drive letter>: regex:stem:^(.*?)(\s\(\d+\))?$ addcolumn:1 dupe:1;extension;size;parentname
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