find Windows path that contains several strings

General discussion related to "Everything".
Post Reply
Marceepoo
Posts: 12
Joined: Sat Jan 05, 2019 7:48 pm

find Windows path that contains several strings

Post by Marceepoo »

I"m running Anaconda python, and the NumPy is not working.
According to several solutions I found at StackOverflow (e.g., https://stackoverflow.com/questions/540 ... 3#58194133), I need to add the following path to the system environment:
C:\Users\<Your user name>\Anaconda3\Library\bin
If the anaconda was not installed in the default directory, please find your own Anaconda3\Library\bin
For reasons which elude me (because I tried to perform a default installation), I don't have a directory "C:\Users\Marc\Anaconda3\Library\bin"
So, now I want to find all paths that include "Anaconda3\Library\bin"
I cannot figure out how to run that search in the Everything GUI, nor from the command line.
I would like to know how to do both ... or either one, if anyone has the time to help me.
Thank you in advance for your help.

Marc
void
Developer
Posts: 15439
Joined: Fri Oct 16, 2009 11:31 pm

Re: find Windows path that contains several strings

Post by void »

Please try the following search (in either ES or Everything):

Anaconda3\Library\bin


-This will find files and folders where Anaconda3\Library\bin is anywhere in the full path and filename.

Please make sure Regex is unchecked under the Search menu.
Please make sure Match Case is unchecked under the Search menu.



The following search might also help:

folder:wfn:bin

=Match folders only and match the whole filename.
Marceepoo
Posts: 12
Joined: Sat Jan 05, 2019 7:48 pm

Re: find Windows path that contains several strings

Post by Marceepoo »

Thank you! Your solution helped me make my Anaconda python able to run numpy and pandas.
Thank you! Thank you!
and ... since no good deed goes unpunished ... I have another question (or two) ...
Assume hypothetically, I want to search for a path that includes two strings that are separated by unknown text, e.g., "Users" and "site-packages".
An obvious regex is: ".+?Users.+?site-packages"
Assume as one alternative, that I want to use the Everything GUI:
  1. Are their fields in the GUI that would enable me to search without regular expressions for a path containing both of those strings?
  2. Assuming the search is possible through the GUI, which fields in the GUI would I populate: (i) if I were searching without using a regex, and how would I separate the strings [e.g., space, comma, etc?]; and (ii) if I wanted to use my regex, what field would I put it in?
  3. Could you help me do a command line search, using a regex? I came up with the following, but I'm sure I have selected the wrong arguments because it seems to me that my regex search string should follow the "-regex", but on the other hand, shouldn't the "-regex [search-string]" follow immediately after the "-path" argument(?):

    Code: Select all

    "E:\Apps\Everything\ES-1.1.0.18\es.exe" -parent-path <path> -regex <search> /ad -export-efu "E:\Apps\Everything\EFU_files\2021-08-03_18-16-11_Regex_path_strings_UNconnected.efu"
Thank you again for whatever you have time for.
Marc
void
Developer
Posts: 15439
Joined: Fri Oct 16, 2009 11:31 pm

Re: find Windows path that contains several strings

Post by void »

Are their fields in the GUI that would enable me to search without regular expressions for a path containing both of those strings?
A space in Everything means AND.

Please try the following search:

users site-packages

Everything Search Syntax (Help -> Search Syntax)

If the order is important, please try the following search:

*users*site-packages*

* = match any character, any number of times.
Note: when using * the whole filename is matched. (use a leading and trailing *)
if I wanted to use my regex, what field would I put it in?
In the search box and prefix your search with regex:

regex:.+?Users.+?site-packages

Note: don't forget to escape white spaces and | with double quotes.

Please try the Advanced Search under the Search menu to help learn the Everything syntax.
There is a regex field in the Advanced Search.
Could you help me do a command line search, using a regex?
Certainly..

"E:\Apps\Everything\ES-1.1.0.18\es.exe" -path "C:\Program Files" -regex "^Everything" /ad -export-efu "E:\Apps\Everything\EFU_files\2021-08-03_18-16-11_Regex_path_strings_UNconnected.efu"

where "C:\Program Files" is the path of interest
and where "^Everything" is your regex search.
Please use -path <directory> instead of -parent-path <directory> (-parent-path will strip off the last path part)
The regex search must appear immediately after -regex
-path <directory> and -regex <search> can appear in any order

If you wish to use the standard Everything syntax to mix with regex, please try the following search

"E:\Apps\Everything\ES-1.1.0.18\es.exe" "C:\Program Files\" regex:"^Everything" /ad -export-efu "E:\Apps\Everything\EFU_files\2021-08-03_18-16-11_Regex_path_strings_UNconnected.efu"
Post Reply