Query files beginning with a specific word

General discussion related to "Everything".
Post Reply
filipeteles
Posts: 18
Joined: Thu Mar 24, 2016 9:53 am

Query files beginning with a specific word

Post by filipeteles »

Tried to figure this one out at the FAQ and Searching.

I want to search for files that begin with a two-letter expression, for instance: 8B, 7B, 1A and some others.

I'm currently doing this: folder\ 8A*.wav

Is it the right way?

Thanks!
Last edited by filipeteles on Thu Mar 24, 2016 9:59 am, edited 1 time in total.
void
Developer
Posts: 16753
Joined: Fri Oct 16, 2009 11:31 pm

Re: Query files beginning with a specific word

Post by void »

8A* or 8A*.wav will work well if you know that first two characters.

To match all variations of file names starting with a single digit and a letter, you could also try something like:

Code: Select all

regex:^[0-9][a-z]
^ = match start of file name
[0-9] match a single character, 0 to 9.
[a-z] match a single character, a to z.

wavs only:
regex:^[0-9][a-z].*wav
filipeteles
Posts: 18
Joined: Thu Mar 24, 2016 9:53 am

Re: Query files beginning with a specific word

Post by filipeteles »

Tried:

regex:^[8-8][A-A]
regex:^[8-8][A-A].wav
regex:^[8-8][A-A]*.wav

8A*.wav

None are working!
void
Developer
Posts: 16753
Joined: Fri Oct 16, 2009 11:31 pm

Re: Query files beginning with a specific word

Post by void »

Please make sure Regex is disabled from the Search menu.
filipeteles
Posts: 18
Joined: Thu Mar 24, 2016 9:53 am

Re: Query files beginning with a specific word

Post by filipeteles »

Tried with Regex disabled and enabled.
void
Developer
Posts: 16753
Joined: Fri Oct 16, 2009 11:31 pm

Re: Query files beginning with a specific word

Post by void »

Please also make sure Match path is disabled from the Search menu.

or you will need to use *\8A*.wav
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: Query files beginning with a specific word

Post by therube »

Find files that start with 8b & have the string 'wav' in them.

Code: Select all

file:   regex:^8b.*wav
> 8bp035-03-sabastian_boaz-some_new_wave_song.mp3


Find files that start with 8b & have the string ".wav" in them

Code: Select all

file:   regex:^8b.*\.wav
In this case, we're looking for ".wav" (the \ escapes the ., making it literal), & in my case, I have nothing that matches that.


(So I create one ...)

> 8bp035-03-sabastian_boaz-some_new_wave.wav_song.mp3

Note that it found the string ".wav", not necessarily a file with an extension of .wav.


Find files that start with 8b & end with ".wav"

Code: Select all

file:   regex:^8b.*\.wav$
> 8bp035-03-sabastian_boaz-some_new_wave.wav_song.mp3.wav
(This matched only because the name ends in .wav, & not because of the other .wav [_wave.wav] that is there.]


Find files that start with 8b & have a .wav file extension

Code: Select all

file: regex:^8b ext:wav

Depending on your needs, this may suffice.

Code: Select all

file:  \8b  ext:wav

(I only include file: because I want to filter out directories.)


Maybe be a bit clearer on just what you're looking for.
Post Reply