Search Syntax Help

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
void
Site Admin
Posts: 4207
Joined: Fri Oct 16, 2009 11:31 pm

Search Syntax Help

Post by void » Mon May 06, 2013 4:39 am

Operators

AND
Use a space for AND.
For example, to search for ABC AND 123:

Code: Select all

ABC 123
OR
Use a | for OR.
For example, to search for ABC OR 123:

Code: Select all

ABC | 123
NOT
Use a ! for NOT.
For example, to exclude ABC from your search:

Code: Select all

!abc
Spaces
Use double quotes (") to escape spaces
For example, the search for the exact phrase ABC 123

Code: Select all

"ABC 123"
Grouping:
Use < and > to group expressions.
For example, to search for mp3 files on your c: and d: drive:

Code: Select all

<c:|d:> *.mp3
Precedence:
<>
!
AND
OR

Examples:
!A !B == (NOT A) AND (NOT B)
A|B C == A OR (B AND C)
A B | C D == (A AND B) OR (C AND D)

void
Site Admin
Posts: 4207
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search Syntax

Post by void » Mon May 06, 2013 4:39 am

Wildcards

*
Matches zero or more characters.

?
Matches one character.

*.
Matches filenames with no extension.

*.*
Same as *

When using wildcards the entire filename is matched.
Please make sure you use a * prefix and * suffix if you want to find a wildcard expression anywhere in the filename.

void
Site Admin
Posts: 4207
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search Syntax

Post by void » Mon May 06, 2013 4:39 am

Macros:

quot:
Literal double quote (")

apos:
Literal apostrophe (')

amp:
Literal ampersand (&)

lt:
Literal less than (<)

gt:
Literal greater than (>)

#x:
Literal unicode character code x.
For example, to search for ¿:

Code: Select all

#191:
You can make your own custom macros with filters and bookmarks.

void
Site Admin
Posts: 4207
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search Syntax

Post by void » Mon May 06, 2013 4:39 am

Modifiers

ascii:
noascii:
utf8:
Enable or disable fast ASCII case comparisons.
Fast ASCII comparisons ignore some case mappings between non-ASCII and ASCII characters (I with dot and i).

case:
nocase:
Match or ignore case.
For example, match ABC but not abc:

Code: Select all

case:ABC
diacritics:
nodiacritics:
Match or ignore diacritical marks.
For example: nodiacritics:a = á

file:
folder:
nofileonly:
nofolderonly:
Match files or folders only.

path:
nopath:
Match the entire path or just the file name.

regex:
noregex:
Enable or disable regex.
For example:

Code: Select all

regex:^foo$
wholefilename:
nowholefilename:
nowfn:
wfn:
Match the entire filename or allow partial matches.

wholeword:
nowholeword:
noww:
ww:
Match whole words only or allow partial matches.

nowildcards:
wildcards:
Allow or disallow wildcards.

void
Site Admin
Posts: 4207
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search Syntax

Post by void » Mon May 06, 2013 4:40 am

Functions

attrib:<attributes>
attributes:<attributes>
Search for files and folders that have the specified attributes set.

<attributes> can be zero or more of the following:
R Read only
H Hidden
S System
D Directory
A Archive
V Device
N Normal
T Temporary
P Sparse file
L Reparse point
C Compressed
O Offline
I Not content indexed
E Encrypted

For example, to find read only files:

Code: Select all

attrib:R
datecreated:<date>
dc:<date>
datemodified:<date>
dm:<date>
recentchange:<date>
rc:<date>
Search for files and folders with the specified creation date, modified date or date recently changed.

<date> can be one of the following formats:
today
yesterday
tomorrow
<last|past|prev|current|this|coming|next><week|month|year>
<last|past|prev|coming|next><x><minutes|hours|weeks|months|years>
january|february|march|april|may|june|july|august|september|october|november|december
jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec
sunday|monday|tuesday|wednesday|thursday|friday|saturday
sun|mon|tue|wed|thu|fri|sat
unknown
year
month/year
day/month/year

For example, to find files modified today:

Code: Select all

dm:today
For example, to find files modified between August 20th 2009 and December 31st 2010:

Code: Select all

dm:20/8/2009-31/12/2010
For example, to find files modified in the last 10 minutes:

Code: Select all

dm:last10minutes
For example, to find files modified on June 10th 2000:

Code: Select all

dm:10/6/2000
For example, to find files modified after May 4th 2013:

Code: Select all

dm:>4/5/2013
For example, to find files modified last week (starting from Sunday)

Code: Select all

dm:lastweek
For example, to find files modified last April

Code: Select all

dm:april
dupe:
Search for duplicated filenames.

empty:
Search for empty folders.

ext:<list>
Search for files with a matching extension in the specified semi-colon delimited extension list.

For example, to find files with the following extensions: jpg, bmp, png and gif:

Code: Select all

ext:jpg;bmp;png;gif
fsi:<index>
Search for files and folders in the specified zero based internal file system index.

len:<length>
Search for files and folders that match the specified filename length.
For example, to find files with full paths that are longer than 260 characters (the maximum for Explorer):

Code: Select all

path:len:>260
parents:<count>
Search for files and folders with the specified number of parent folders.
for example, find files and folders that belong to a root folder:

Code: Select all

parents:1
root:
Search for files and folders with no parent folders.

size:<size>
Search for files with the specified size in bytes.

For example, to find files larger than 10MB:

Code: Select all

size:>10mb
For example, to find files between 20GB and 30GB:

Code: Select all

size:20gb-30gb
For example, to find files smaller than 1MB:

Code: Select all

size:<1mb
type:<type>
Search for files and folders with the specified type.

For example, to find files with image in the type:

Code: Select all

type:"Image"

void
Site Admin
Posts: 4207
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search Syntax Help

Post by void » Mon May 06, 2013 5:46 am

Search tips

Search the full path without enabling match path

Code: Select all

\download
This will find all files that are in a download folder.

Faster date/size searching
Since using a date/size search can be extremely slow, try reducing the number of files by searching for a path first:

Code: Select all

\download dm:today
Do not search subfolders
Example: search for the folder c:\abc, but do not include subfolders:

Code: Select all

c:\abc !c:\abc\*\*

3o5v9867zsi378
Posts: 2
Joined: Wed Feb 04, 2015 12:51 am

Re: Search Syntax Help

Post by 3o5v9867zsi378 » Wed Feb 04, 2015 1:02 am

hi

i'm getting no results for the dm:today query or the "size:" queries ...

i've read the help but i can't work out what the stupid thing i'm doing is ...

would be very grateful for some help

love the program btw!

3o5v9867zsi378

3o5v9867zsi378
Posts: 2
Joined: Wed Feb 04, 2015 12:51 am

Re: Search Syntax Help

Post by 3o5v9867zsi378 » Wed Feb 04, 2015 1:30 am

hi again

not sure why but all the searches have now started working ... i upgraded from 1.2 to 1.3 ... could that have done it?

was a new index created?

anyhow, all working now, thanks

3o5v9867zsi378

Ambaquista
Posts: 2
Joined: Fri Apr 17, 2015 1:58 pm

Re: Search Syntax Help

Post by Ambaquista » Fri Apr 17, 2015 2:55 pm

How to search ONLY in the filename, excluding the extension?

Example:
I´ve 1000+s of files *.MHT (all included HTML) and I need to find files with "mht" in the name, files about the MHT format, p. ex.

Any possibility, in Everything?

Thanks

therube
Posts: 1984
Joined: Thu Sep 03, 2009 6:48 pm

Re: Search Syntax Help

Post by therube » Fri Apr 17, 2015 7:11 pm

Code: Select all

mht  !.mht
Search for "mht", but not ".mht".

Note that it would NOT find a file named: testing.mht.123.MHT

You could also mess around with Regular Expressions, if need be.

Ambaquista
Posts: 2
Joined: Fri Apr 17, 2015 1:58 pm

Re: Search Syntax Help

Post by Ambaquista » Fri Apr 17, 2015 8:35 pm

Thank you, it works!
I´ve tried mht!.mht (without space before the !) and didn´t work.
Works also with just one space before the !
Thank you again

gggirlgeek
Posts: 29
Joined: Tue Dec 28, 2010 4:54 pm

Re: Search Syntax Help

Post by gggirlgeek » Sat Jun 06, 2015 4:45 am

Just came across another of void's clever Macros in a post here.

child:<string>


Folders containing objects that match the specified search

for example, find folders that contain .mp3 files

Code: Select all

child:*.mp3
find folders that contain objects created in the last hour

Code: Select all

child:* dc:last1hours
(notice the space before the next filter!)

Hmm
Posts: 1
Joined: Sat Aug 20, 2016 9:01 pm

Re: Search Syntax Help

Post by Hmm » Sat Aug 20, 2016 9:07 pm

Perhaps I am missing something but none of these more complex syntax work. Where are you supposed to type them in? For example, I am trying to find files created or modified on 2015-10-31

I even tried this synatx with no results: 1:* dc:last1hours. I entered it in the search bar. The only search that works is wild cards or typing normal file names.

void
Site Admin
Posts: 4207
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search Syntax Help

Post by void » Sun Aug 21, 2016 4:02 am

Where are you supposed to type them in?
Type your searches into the search box at the top of Everything.
For example, I am trying to find files created or modified on 2015-10-31
How are dates displayed on your computer? 31/10/2015? 10/31/2015? 2015/10/31?

Type in dates in the same format as how they are displayed on your computer.

Please try searching for:
dm:31/10/2015

Use / to separate day/month/year.
I even tried this synatx with no results: 1:* dc:last1hours. I entered it in the search bar. The only search that works is wild cards or typing normal file names.
1:* should not match anything, what are you trying to search for here?

Note: Please make sure regex is disabled from the Search menu, search functions will not work when regex is enabled.
Please try the Everything 1.4 beta and look at Search -> Advanced Search... to help with search syntax.

wddt
Posts: 6
Joined: Tue Jan 28, 2014 3:54 am

Re: Search Syntax Help

Post by wddt » Mon Aug 29, 2016 1:34 pm

This is VERY basic, but I had trouble with it so someone else might. I couldn't seem to get Everything to "sort by date" and I was going crazy. Turns out it was the way I had E set up. When I made ALL the Date Columns VISIBLE (modified, created, accessed and recently changed), the date-related functions worked. (Answer to an un-asked question, I guess.)

marius
Posts: 2
Joined: Mon Jan 23, 2017 6:28 pm

Re: Search Syntax Help

Post by marius » Mon Jan 23, 2017 6:41 pm

dm:april shows modified in last april.
is it possible to show files modified in april(month) from all years?
thanks!

Just Visiting
Posts: 4
Joined: Sat Jul 16, 2011 10:38 pm

Search specific drive only

Post by Just Visiting » Mon May 22, 2017 11:50 pm

I can't figure this out. Intuitively, one should be able to enter "K:*.*" without quotes. But that is not an operation Everything understands.

What is the workaround?

void
Site Admin
Posts: 4207
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search Syntax Help

Post by void » Tue May 23, 2017 12:23 am

k:*.* should find all files on your k: drive. Please make sure you have regex disabled from the Search menu.
searching for k: will also work.

Do you have any active filters or other search options enabled from the Search menu?

D1ma
Posts: 2
Joined: Fri Sep 15, 2017 2:18 pm

Re: Search Syntax Help

Post by D1ma » Fri Sep 15, 2017 2:22 pm

Hi everyone!
Looking for help: I want to search all files wich were created in specific time.
E.g. I use dc:13/09/2017..13/09/2017 but I want to add time 14:00-18:00.

ovg
Posts: 134
Joined: Thu Oct 27, 2016 7:19 pm

Re: Search Syntax Help

Post by ovg » Fri Sep 15, 2017 3:44 pm

2D1ma

Everything Help:

Date Syntax:
year
month/year or year/month depending on locale settings
day/month/year, month/day/year or year/month/day depending on locale settings
YYYY[-MM[-DD[Thh[:mm[:ss[.sss]]]]]]
YYYYMM[DD[Thh[mm[ss[.sss]]]]]
Eg
dc:19-05-2013T17:05:31..19-05-2013T21:02 working fine for me ....

Stamimail
Posts: 672
Joined: Sat Aug 31, 2013 9:05 pm

Re: Search Syntax Help

Post by Stamimail » Sun Sep 17, 2017 2:09 pm

@void
Should add Time to Advanced Search?

D1ma
Posts: 2
Joined: Fri Sep 15, 2017 2:18 pm

Re: Search Syntax Help

Post by D1ma » Mon Sep 18, 2017 7:33 am

@ovg thank you. I missed the "T" letter in my experiments.

How about adding examples for search syntax, not only general expressions?

void
Site Admin
Posts: 4207
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search Syntax Help

Post by void » Mon Sep 18, 2017 10:12 am

The help here is a little dated, please check:
http://www.voidtools.com/support/everyt ... ate_syntax for more up-to-date help.

I'll consider adding time input to the advanced search.

lgjmac
Posts: 1
Joined: Tue Dec 26, 2017 10:49 pm

Re: Search Syntax Help

Post by lgjmac » Mon Jan 08, 2018 12:46 pm

Hi there.
Everything is great.

I have a specific search which brings to light some questions that may not be clear to other users too

The uncertainty regards:
1. operator priority e.g. regex:child:expression works but child:regex:expression does not
2. with OR syntax expressionSPACE|SPACEexpression and expression|expression seems to be equal
3. use of brackets <> can operators be inside brackets?
4. use of child: parameter ... it seems child:pic: doesn't work?
5. using OR statements in regex filename search as a workaround?
6. do operators only act on subsequent expressions until the next space e,g, is child:*.jpg|child:*.png the same as child:<*.jpg|*.png> the same and different to child:*.jpg child:*.png

Probably some basic coding issues lacking for me.

I am looking for:
- a list of folders
- that contain pictures
- where the pictures have names with 2016 2017 or 2018 in the filename (e.g. Screenshot_20161202.png or 20170104_123320.jpg)
- which may be in folders labelled in spanish or english
- excluding some folders


Does this seems right?
child:*.jpg|child:*.png|child:*.gif|child:*.bmp|child:*.jpeg|child:*.img regex:child:^.*201[678].* nodiacritics: !"C:\windows" !"C:\system" !"C:\program"


Thank you

HerbM
Posts: 11
Joined: Tue Feb 27, 2018 3:18 am

Re: Search Syntax Help

Post by HerbM » Sat Oct 06, 2018 1:31 am

Great thread. Caused me to find this type of info in the manual -- didn't know these macros and keywords existing/worked for es.exe.

exe: & zip: (maybe more) don't seem to be working from es.exe (version ES 1.1.0.10).

None of these work:
es exe:
es exe:*
es exe: rg
es exe: *rg*
es zip: powershell
es zip: *powershell*
These work:
es rg.exe
es rg.exe -w
es powershell*.zip
I was using regular expressions for most every complicated search, or post filtering with PowerShell and ripgrep. (All useful tricks but these macros are much simpler and easier.)

Nice would be to support square bracket character ranges in simple WILDCARD searches. PowerShell supports this, CMD.exe doesn't; Linux/Unix generally does: dir wmiclasse[a-s0-9].txt finds wmiclasses.txt etc.

I LOVE this program.

For me it would be ho-hum without es.exe, but together these are truly amazing. Use them dozens of times a day, everyday. Thanks.

void
Site Admin
Posts: 4207
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search Syntax Help

Post by void » Sat Oct 06, 2018 2:49 am

ES does not support filters, this is on my TODO list.
For now you will need to manually expand these filters, eg: instead of searching for exe: search for:
ext:bat;cmd;exe;msi;scr
Nice would be to support square bracket character ranges in simple WILDCARD searches. PowerShell supports this, CMD.exe doesn't; Linux/Unix generally does: dir wmiclasse[a-s0-9].txt finds wmiclasses.txt etc.
I might add an UI option to do this, for the next version of Everything I support two wildcard functions, one that is used in your common open file dialog, eg: *.txt and another which support character ranges with [], # = digit and backslash escapes (eg: \u00C6).
However, this is currently only used when searching content with the wildcard: modifier, such as wildcard:content:"[abc]*[123]"

Thanks for the suggestions.

HerbM
Posts: 11
Joined: Tue Feb 27, 2018 3:18 am

Re: Search Syntax Help

Post by HerbM » Sat Oct 06, 2018 6:48 pm

NP, I just thought the EXE: macro was supposed to be available after reading the above.

There are a few ways to get at this.

One simple improvement for the "ext:" macro would be to ignore a leading '.' (dot) since by definition all extensions have a dot, at least implicitly.

As is you can't use this syntax to get at these easily:
es where ext:%PathExt% && rem because PathExt is formed with the dot present
es comp ext:$Env:PathExt ## PowerShell version
You can do tedious PowerShell tricks like
es comp.* ext:"$($Env:PathExt.replace('.',''))"
# or cmd version
cmd /c es comp.* ext:%pathext:.=%
In my experience there are VERY FEW people who know how to do Cmd.exe environment string replacement like the above.

FYI: I have long (20+ years) had a comp.cmd or comp.bat to feed "n" (No I don't want to compare more files) into comp.exe.
Stupid comp.exe was one of the poorest designed DOS/cmd programs ever. In DOS days, I used to just go in with a Hex editor and bypass the call to the "question" subroutine by changing one byte, but that's impractical today when working on dozens or tens of thousands of network computers.)

BTW: Another useful trick is to have a "file of Ns": In my Bat directory are 2 files named N and N.txt which have 64K lines of nothing but N (for No) to allow redirection to commands that ask questions but which only accept switches for Y(es) or have no switch at all to avoid such questions. Xcopy is in the former category, comp in the latter.

There is a Y and Y.txt also, but these are seldom required.

Post Reply