-filename switch

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
Nistag
Posts: 3
Joined: Mon Dec 29, 2014 6:49 am

-filename switch

Post by Nistag »

Hi, Greetings to all forum members

When I launch Everything from the command line there is a strange behaviour of the -filename switch.
If i want to search files whose names contain test I type in the prompt

Code: Select all

C:\Program Files\Everything\everything.exe -filename test
But the result is that Everything looks for "C:\Program Files\Everything\test" instead it should be "C:\Program Files\Everything\" test
In fact the default behaviour of Everything bring an insufficient result: many results are omitted. Instead "C:\Program Files\Everything\" test is the correct way to do searches: every file is found.
I don't want to use -search switch because it searches on all drive, instead I'd like to limit the command line search to a specific folder

I hope it is clear. Sorry for my poor english but what I want to write to you isn't easy
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: -filename switch

Post by therube »

Everything is not searching for "C:\Program Files\Everything\" anything, in particular.

"C:\Program Files\Everything\" is simply the path to the program you are running, its location.

If you wanted to look for "test" within the "C:\Program Files\Everything\" directory tree then you could use -search command line switch, so something like:

Code: Select all

C:\Program Files\Everything\everything.exe  -search  "C:\Program Files\Everything\  test"
I don't want to use -search switch because it searches on all drive, instead I'd like to limit the command line search to a specific folder.
And as shown above, if you include your wanted specified folder as part of the -search parameter, then that is what you'll get.

Code: Select all

C:\Program Files\Everything\everything.exe  -search  "C:\TMP\  test"
This will search for the string "test", within the C:\TMP\ directory tree.
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: -filename switch

Post by therube »

I'm not clear on what -filename is doing, but it looks like it is searching for a "fully qualified file name", meaning exactly what you have specified, anything within the quotes, & anything outside the quotes is not considered part of "-filename".

And further if the path is omitted, it defaults to the current working directory.

So what it is doing is the same as if you had enabled the (Windows) context-menu & initiated a search that way.
(Everything | Options | General -> Show folder context menus)
Nistag
Posts: 3
Joined: Mon Dec 29, 2014 6:49 am

Re: -filename switch

Post by Nistag »

Thank you very much. Search command with the correct syntax is what I need
Post Reply