I have a ton of photos that are duplicates 511299605_1261786142451344_3005812996914051374_n and 511299605_1261786142451344_3005812996914051374_n(1) but one of these files is larger. say 200x200 and one is 1600x1600 I want to show only the smaller of the two. Then I will delete them.
I am not sure how to search in this manner. the (1) could be different (1),(2),(3) but base (the name before brackets) will always be correct. The base might not be the "Original" since some are thumbnails and I assume they got named by order of how the file was saved.
I tried searching and thought I msg only when I ran out of options.
Find duplicate files and show the smallest version (1),(2)
Re: Find duplicate files and show the smallest version (1),(2)
Does the following search help:
regex: == enable regular expressions.
\( == match a literal (
\d+ == match 1 or digits
\) == match a literal )
\. == match a literal .
[^.]+ == match any character (except .) one or more times.
$ == match the end of the filename.
Do you need to check if the base exists?
-If so, please try:
^ == match the start of the filename
(.*) == match any character any number of times and capture the result in $1:
(\.[^.]+$) == match and capture the extension.
fileexists: == check if the specified filename exists.
$1:$2: == recalls the captured regex group -this will be the base name without the (1) part.
Is there a space before the (
-If so, please try:
\s == match a space.
regex:\(\d+\)\.[^.]+$regex: == enable regular expressions.
\( == match a literal (
\d+ == match 1 or digits
\) == match a literal )
\. == match a literal .
[^.]+ == match any character (except .) one or more times.
$ == match the end of the filename.
Do you need to check if the base exists?
-If so, please try:
regex:^(.*)\(\d+\)(\.[^.]+$) fileexists:$1:$2:^ == match the start of the filename
(.*) == match any character any number of times and capture the result in $1:
(\.[^.]+$) == match and capture the extension.
fileexists: == check if the specified filename exists.
$1:$2: == recalls the captured regex group -this will be the base name without the (1) part.
Is there a space before the (
-If so, please try:
regex:^(.*)\s\(\d+\)(\.[^.]+$) fileexists:$1:$2:\s == match a space.
Re: Find duplicate files and show the smallest version (1),(2)
The following will show the smallest versionSFind duplicate files and show the smallest version (1),(2)
Code: Select all
pic: regex:^(\d{8,}_\d{8,}_\d{8,}_n) A:=$height:*$width: dupe:1 distinct-sort:A-descending !distinct:1Re: Find duplicate files and show the smallest version (1),(2)
Thank you. Worked perfectly