Searching within folders

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
terrypin
Posts: 208
Joined: Mon Mar 18, 2013 2:41 pm

Searching within folders

Post by terrypin »

My apologies if this is fully covered somewhere, but I still can't grasp how I search for strings within paths.

For example what do I enter to search for files that match 2013*.jpg within a path that contains the subfolder SDW-May2013 ? One hit would be
C:\Docs\My Pictures\PHOTOS\SDW-May2013\20130601-085828.JPG

Slightly harder, how would I find files that match 2013*.jpg within a path that contains the subfolder PHOTOS? One hit would be
C:\Docs\My Pictures\PHOTOS\Walks UK\2013\20130101-133234.JPG

Edit: A few minutes later I had a flash of inspiration (or more likely a recollection from asking something similar before!) and I think I'm almost there.

At first I thought it was simply a matter of treating the whole file path and filename as one long string and just using spaces to represent blanks. That assumption was reinforced because searches like c: 2013*.jpg delivered correctly, showing only results within C: (and no other drive). But I soon found that the only part of the path that worked in this easy way was the drive letter. Strings like SDW-May2013 or May2013 or *2013 didn't work.

It was only then that I remembered that Paths are treated in some special way. So I enabled Match Path and experimented again.

c: 2013*.jpg \SDW-May2013 now works OK.
But c: 2013*.jpg SDW-May2013 doesn't. Must a path always have the '\' prefix?
And c: 2013*.jpg \*May2013 doesn't work. Are wildcards not allowed in paths searches?

--
Terry, East Grinstead, UK
Last edited by terrypin on Wed Jun 19, 2013 8:43 am, edited 1 time in total.
void
Developer
Posts: 16748
Joined: Fri Oct 16, 2009 11:31 pm

Re: Searching within folders

Post by void »

Please make sure match path is disabled from the search menu, otherwise 2013*.jpg will not match anything.
Wildcards match the entire path and filename when you enable match path from the search menu.

2013*.jpg will never match C:\Docs\My Pictures\PHOTOS\SDW-May2013\20130601-085828.JPG
because C:\Docs\My Pictures\PHOTOS\SDW-May2013\20130601-085828.JPG does not start with 2013.

If you want to leave match path enabled, please search for:

Code: Select all

SDW-May2013 *\2013*.jpg
For example what do I enter to search for files that match 2013*.jpg within a path that contains the subfolder SDW-May2013 ? One hit would be
C:\Docs\My Pictures\PHOTOS\SDW-May2013\20130601-085828.JPG
With match path disabled from the search menu:

Code: Select all

\SDW-May2013 2013*.jpg
The \ prefix makes SDW-May2013 match the full path (The \ must also match in the path)

-or-

Code: Select all

SDW-May2013\ 2013*.jpg
The \ suffix makes SDW-May2013 match the full path (The \ must also match in the path)

-or-

Code: Select all

path:SDW-May2013 2013*.jpg
the path modifier specifies that SDW-May2013 can occur anywhere in the path.
Slightly harder, how would I find files that match 2013*.jpg within a path that contains the subfolder PHOTOS? One hit would be
C:\Docs\My Pictures\PHOTOS\Walks UK\2013\20130101-133234.JPG
With match path disabled from the search menu:

Code: Select all

\PHOTOS 2013*.jpg
-or-

Code: Select all

PHOTOS\ 2013*.jpg
-or-

Code: Select all

path:PHOTOS 2013*.jpg
terrypin
Posts: 208
Joined: Mon Mar 18, 2013 2:41 pm

Re: Searching within folders

Post by terrypin »

Thanks! Such an impressively fast reply that I read it only after my edit, so now studying it.

I suspect there are just a couple of basic principles or rules that I need to grasp and then hopefully it will become intuitive.

--
Terry, East Grinstead, UK
void
Developer
Posts: 16748
Joined: Fri Oct 16, 2009 11:31 pm

Re: Searching within folders

Post by void »

The problem that gets a lot of people is wildcards match the whole filename.

I will probably change this in a future release.
terrypin
Posts: 208
Joined: Mon Mar 18, 2013 2:41 pm

Re: Searching within folders

Post by terrypin »

Have now studied your thorough reply and reckon I've finally grasped it! Bookmarked this thread for future reference.

To reinforce this, can you just confirm my assumptions here are correct please?

Image

Image

Image

--
Terry, East Grinstead, UK
void
Developer
Posts: 16748
Joined: Fri Oct 16, 2009 11:31 pm

Re: Searching within folders

Post by void »

1).

Code: Select all

landscape
is the same as

Code: Select all

*landscape*
2). prefixing landscape with a \ will mean that the file (or folder) must start with landscape.
It will also find subfolders and files in any folder starting with landscape. Because the \ prefix enables full path matching.

For example, the following would also match the search \landscape

Code: Select all

c:\landscape123\ABC.txt
3). \public will find files and folders that start with public.
It will also find subfolders and files in any folder starting with public.
terrypin
Posts: 208
Joined: Mon Mar 18, 2013 2:41 pm

Re: Searching within folders

Post by terrypin »

Many thanks, understood.

--
Terry, East Grinstead, UK
Post Reply