Strange behaviour with filenames containing spaces

Discussion related to "Everything" 1.5 Alpha.
Post Reply
horst.epp
Posts: 1443
Joined: Fri Apr 04, 2014 3:24 pm

Strange behaviour with filenames containing spaces

Post by horst.epp »

I invoke an Everything search with the following command line
Everything64.exe -s wfn:"e1x alt-saved.txt"
Note the space inside the file name and the quotes around it.
There is no result from this search.
Screenshot - 03.09.2021 , 22_03_53.png
Screenshot - 03.09.2021 , 22_03_53.png (7.1 KiB) Viewed 3610 times
Using the same search in the GUI works.
Screenshot - 03.09.2021 , 22_08_43.png
Screenshot - 03.09.2021 , 22_08_43.png (9.27 KiB) Viewed 3608 times
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Strange behaviour with filenames containing spaces

Post by void »

Please escape double-quotes with triple-double-quotes from the command line:

Everything64.exe -s wfn:""""e1x alt-saved.txt""""

will set the search to:

wfn:"e1x alt-saved.txt"



Command Line Options - Notes
Last edited by void on Fri Sep 03, 2021 10:15 pm, edited 1 time in total.
Reason: """ = single literal " and we still need double quotes to escape spaces in the command line argument
horst.epp
Posts: 1443
Joined: Fri Apr 04, 2014 3:24 pm

Re: Strange behaviour with filenames containing spaces

Post by horst.epp »

That doesn't work for me.
Result is
Screenshot - 04.09.2021 , 00_00_45.png
Screenshot - 04.09.2021 , 00_00_45.png (7.69 KiB) Viewed 3601 times
Input was
Screenshot - 04.09.2021 , 00_03_09.png
Screenshot - 04.09.2021 , 00_03_09.png (4.53 KiB) Viewed 3601 times
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Strange behaviour with filenames containing spaces

Post by void »

Include double quotes to escape spaces in the command line argument:

Everything64.exe -s wfn:""""e1x alt-saved.txt""""

will set the search to:

wfn:"e1x alt-saved.txt"
horst.epp
Posts: 1443
Joined: Fri Apr 04, 2014 3:24 pm

Re: Strange behaviour with filenames containing spaces

Post by horst.epp »

I copied the solution from another thread :D
-s nopath:exact:#quote:#[basename:"%S1"#]:
This works for my usage from inside of Total Commander
where the files name %S1 is a parameter from TC.
Post Reply