Only show files when the first 3 N characters are the same

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
wadaw
Posts: 3
Joined: Thu Sep 29, 2022 12:14 am

Only show files when the first 3 N characters are the same

Post by wadaw »

Please help me with filtering out files from the search window when the first 3 N characters are the same
void
Developer
Posts: 16683
Joined: Fri Oct 16, 2009 11:31 pm

Re: Only show files when the first 3 N characters are the same

Post by void »

Please try the following search:

!regex:^(.)\1\1

! = NOT
regex: = enable regular expressions
^ = match the start of the filename
() = capture group
. = match a single character
\1 = match the captured group
wadaw
Posts: 3
Joined: Thu Sep 29, 2022 12:14 am

Re: Only show files when the first 3 N characters are the same

Post by wadaw »

That worked, but I had too many files with the same first 3 N characters.

Is it possible to only show files with the same first 3 N characters when they're in the same directory?

C:\test1\test2\test3\001 file1.mp3
C:\test1\test2\test3\001 file2.mp3
void
Developer
Posts: 16683
Joined: Fri Oct 16, 2009 11:31 pm

Re: Only show files when the first 3 N characters are the same

Post by void »

You'll need Everything 1.5 with the following search:

path:regex:^(.*\\[^\\][^\\][^\\])[^\\]*$ addcolumn:regmatch1 dupe:regmatch1

path: = match the full path.
\\ = match a single literal \
[^\\] = match any character, except \
$ = match the end of the filename.
addcolumn:regmatch1 = add a column showing the captured regex match of interest.
dupe:regmatch1 = find files/folders where the captured regex match is duplicated.



If you want to match the starting digits only, please try:

path:regex:^(.*\\\d\d\d)[^\\]*$ addcolumn:regmatch1 dupe:regmatch1
wadaw
Posts: 3
Joined: Thu Sep 29, 2022 12:14 am

Re: Only show files when the first 3 N characters are the same

Post by wadaw »

It'll take too long to scan for new files if I install the beta, I'll wait for the normal version to get updated to 1.5
horst.epp
Posts: 1443
Joined: Fri Apr 04, 2014 3:24 pm

Re: Only show files when the first 3 N characters are the same

Post by horst.epp »

wadaw wrote: Thu Sep 29, 2022 8:26 am It'll take too long to scan for new files if I install the beta, I'll wait for the normal version to get updated to 1.5
That would also require a rescan.
The version 1.5 is so much better that you should switch.
Also it allows to search while indexing in the background.
Post Reply