How to write a command if the path contains spaces

General discussion related to "Everything".
Post Reply
zecn
Posts: 2
Joined: Tue Jul 04, 2023 8:16 am

How to write a command if the path contains spaces

Post by zecn »

I want to search for *. jpg files in the "C:\Program Files\SomeDir\" folder.
However, this path contains spaces and the result is empty.
So how to write this command?
void
Developer
Posts: 16682
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to write a command if the path contains spaces

Post by void »

Everything.exe -s """"C:\Program Files\SomeDir\""" *.jpg"

Triple double quotes (""") = single literal quote (")
Don't forget to use quotes to also escape spaces.

Command line options



With Everything 1.5:

Everything.exe -s* "C:\Program Files\SomeDir\" *.jpg
void
Developer
Posts: 16682
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to write a command if the path contains spaces

Post by void »

If you're not using the command line and just setting the search, please use double quotes to escape the spaces:

Search for:

"C:\Program Files\SomeDir\" *.jpg
zecn
Posts: 2
Joined: Tue Jul 04, 2023 8:16 am

Re: How to write a command if the path contains spaces

Post by zecn »

Thank you for giving me such a detailed answer! ^-^
Post Reply