how to restrict my search to a specific folder without having to type the full path?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
BigDan
Posts: 51
Joined: Tue May 23, 2017 9:24 pm

how to restrict my search to a specific folder without having to type the full path?

Post by BigDan »

I'd like to search for my resume in a folder called 'Apple'. So that's easy enough, I'd just search "resume \apple\".
However I've got a C and E drive and I don't want the E drive results to come up. But I also dont want to have to type in C:\users\bigdan\documents\desktop\career\apple\ each time either.

How do I search for resumes within the C drive within a folder called Apple with as few characters as possible?
froggie
Posts: 300
Joined: Wed Jun 12, 2013 10:43 pm

Re: how to restrict my search to a specific folder without having to type the full path?

Post by froggie »

Try
c: \apple resume
With the spaces.
BigDan
Posts: 51
Joined: Tue May 23, 2017 9:24 pm

Re: how to restrict my search to a specific folder without having to type the full path?

Post by BigDan »

oh wow!! i didn't expect that to work haha. thanks so much!

is there a simple way to exclude the subfolders within apple? that's not that important, just curious
is there also a way to see all the contents of apple, not just the resumes? again, not as imp.
RegexNinja
Posts: 18
Joined: Sat Apr 11, 2020 2:45 pm

Re: how to restrict my search to a specific folder without having to type the full path?

Post by RegexNinja »

For the regexers out there: regex:C:.*\\apple\\resume\.[a-z]{3,4}$
Foldername must be Apple (not Apple2, etc).. Names must be like "Resume.ext" (3-or-4 chars in extension).
No need to worry about SubFolders.. Cheers!
Last edited by RegexNinja on Fri Oct 02, 2020 7:18 pm, edited 1 time in total.
froggie
Posts: 300
Joined: Wed Jun 12, 2013 10:43 pm

Re: how to restrict my search to a specific folder without having to type the full path?

Post by froggie »

BigDan wrote: Fri Oct 02, 2020 5:35 pm is there also a way to see all the contents of apple, not just the resumes? again, not as imp.
Staying with the regex theme:

regex:C:.*\\apple\\[^\\]*$
RegexNinja
Posts: 18
Joined: Sat Apr 11, 2020 2:45 pm

Re: how to restrict my search to a specific folder without having to type the full path?

Post by RegexNinja »

Sorry, I didnt catch the "see all contents" part, so Froggie's last post is best for that.
Just throw in files: if you dont wanna see SubFolderNames directly beneath Apple.
Cheers.
BigDan
Posts: 51
Joined: Tue May 23, 2017 9:24 pm

Re: how to restrict my search to a specific folder without having to type the full path?

Post by BigDan »

I'm sorry I don't understand the RegEx stuff?
froggie
Posts: 300
Joined: Wed Jun 12, 2013 10:43 pm

Re: how to restrict my search to a specific folder without having to type the full path?

Post by froggie »

You could just copy it, replacing "apple" with whatever the name of the folder you are interested in

Or

infolder:C:\users\bigdan\documents\desktop\career\apple\


Or

C: \apple\ depth:7


See Everything Help for a description of infolder: and depth:
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: how to restrict my search to a specific folder without having to type the full path?

Post by NotNull »

A regex crash course:


A regular expression (short: regex) is a 'formula' to describe the textpattern you are looking for.
These are the basics (from the Everything help; no need to read it all right now):

Code: Select all


Regex Syntax:

a|b		Matches a or b
gr(a|e)y	Matches gray or grey
.		Matches any single character
[abc]		Matches a single character a, b or c
[^abc]		Matches any single character except a, b or c
[a-z]		Matches a single charactor in the range a to z
[a-zA-Z]	Matches a single charactor in the range a to z or A to Z
^		Matches the start of the filename
$		Matches the end of the filename
( )		Defines a marked subexpression
\n		Matches what the nth marked subexpression matched, where n is a digit from 1 to 9
\b		Match word boundaries
*		Matches the preceding element zero or more times
?		Matches the preceding element zero or one times
+		Matches the preceding element one or more times
*?		Lazily matches the preceding element zero or more times
+?		Lazily matches the preceding element one or more times
{x}		Matches the preceding element x times
{x,}		Matches the preceding element x or more times
{x,y}		Matches the preceding element between x and y times
\		Escape special character




These are the interesting bits from the help text for your "apple" case:

Code: Select all

.		Matches any single character
[^abc]		Matches any single character except a, b or c
$		Matches the end of the filename
*		Matches the preceding element zero or more times
\		Escape special character


There are quite a few characters that have special meaning as they are part of the regex 'vocabulary'
As you can see in the list above, they are: ^ $ ( ) [ ] ? . { } + \ |
If you need to search for text that contains these characters, you need to tell the regex 'engine' that you want the literal character and not the regex meaning. That can be done by using an escape character, the backslash (\), in front of these characters.
So if you want to search for the text a(b), that would look like this in regex formula: a\(b\)



A breakdown of froggie's C:.*\\apple\\[^\\]*$:
Search for:
C: the text c:
followed by
.* zero or more characters (could be anything and any length)
followed by
\\ a backslash (the \ is one of those characters with special meaning, so has to be preceded by the \ escape character)
followed by
apple the text apple
followed by
\\ a backslash (the \ is one of those characters with special meaning, so has to be preceded by the \ escape character)
followed by
[^\\]* zero or more characters, as long as it is not a \ . (This will make sure it doesn't look for sub-folders of apple as that would always require a \)
followed by
$ the end of the filename (so: followed by nothing :))



Subtitled:

Search for file-/foldenames that start with C:, followed by any amount of random characters, followed by \apple\ and are not a sub-folder of that apple folder.
Post Reply