How to Use ES to Search Only for Files with Keywords in the Filename?
-
- Posts: 8
- Joined: Thu Aug 15, 2024 3:32 am
How to Use ES to Search Only for Files with Keywords in the Filename?
When I use 'es' to call Everything for searching, I notice that when I search for 'student' files, the 'bin', '01' and other files inside the 'student' folder, which do not contain 'student' in their filenames, are also searched. This is not what I want. Is there a way to only query files that have 'student' in their filenames, just like when using Everything's GUI?
Looking forward to the experts to help me out
Looking forward to the experts to help me out
Re: How to Use ES to Search Only for Files with Keywords in the Filename?
ES will search names (not full paths) by default.
Do you have an es.ini in the same location as your es.exe?
Please make sure match_path is disabled in your es.ini:
match_path=0
Do you have an es.ini in the same location as your es.exe?
Please make sure match_path is disabled in your es.ini:
match_path=0
-
- Posts: 8
- Joined: Thu Aug 15, 2024 3:32 am
Re: How to Use ES to Search Only for Files with Keywords in the Filename?
I originally did not have an es.ini file, so I created one and wrote match_path=0 in it (this is also the only line in the entire file), but it still didn't work. What else might I be missing?
Re: How to Use ES to Search Only for Files with Keywords in the Filename?
Are you calling ES with -p or -match-path ?
-
- Posts: 8
- Joined: Thu Aug 15, 2024 3:32 am
Re: How to Use ES to Search Only for Files with Keywords in the Filename?
Please try without -p
-p = match full path and name.
-p = match full path and name.
-
- Posts: 8
- Joined: Thu Aug 15, 2024 3:32 am
Re: How to Use ES to Search Only for Files with Keywords in the Filename?
I thought -p was for limiting the scope of directory access; I never doubted that! My problem is solved, thank you so much! You are such a kind person.
Re: How to Use ES to Search Only for Files with Keywords in the Filename?
use -path to limit results to a specific folder.
For example:
ES -path "C:\Program Files"
For example:
ES -path "C:\Program Files"
-
- Posts: 8
- Joined: Thu Aug 15, 2024 3:32 am
Re: How to Use ES to Search Only for Files with Keywords in the Filename?
Oh! I understand now, I thought -p stood for 'path' abbreviation, haha, thank you very much!
-
- Posts: 8
- Joined: Thu Aug 15, 2024 3:32 am
Re: How to Use ES to Search Only for Files with Keywords in the Filename?
A new issue has emerged.
Previously, when I was using Everything to search with ES, I used to combine and exclude folder paths by separating them with spaces and a pipe symbol "|" or a space and an exclamation mark "!".
like "D:\xlj\ERP2022 |D:\xlj\360se6 |D:\xlj\IISDir".
However, this method seems to have stopped working now. Do you know the reason? Moreover, when I tried to revert the -path back to -p, it only detected the first directory path, which indicates that this is probably not the cause.
Previously, when I was using Everything to search with ES, I used to combine and exclude folder paths by separating them with spaces and a pipe symbol "|" or a space and an exclamation mark "!".
like "D:\xlj\ERP2022 |D:\xlj\360se6 |D:\xlj\IISDir".
However, this method seems to have stopped working now. Do you know the reason? Moreover, when I tried to revert the -path back to -p, it only detected the first directory path, which indicates that this is probably not the cause.
Re: How to Use ES to Search Only for Files with Keywords in the Filename?
Please try escaping | with ^|
If you are calling from powershell:
es D:\xlj\ERP2022\ ^| D:\xlj\360se6\ ^| D:\xlj\IISDir\
If you are calling from powershell:
es D:\xlj\ERP2022\ `| D:\xlj\360se6\ `| D:\xlj\IISDir\
-
- Posts: 8
- Joined: Thu Aug 15, 2024 3:32 am
Re: How to Use ES to Search Only for Files with Keywords in the Filename?
I tried your methods, but it didn't work.
I tried using "es -n 300 -path D:\ ^| C:\ xlj" to search for folders containing "xlj" in both the D and C drives, but the result was only one item, which was the same as when using "es -n 300 -path D:\ xlj".
When I used "es -n 300 -path C:\ xlj", I was able to find two results.
I also tried the "`|" , and the result was also empty.
Did I make a mistake in some part of it?
I tried using "es -n 300 -path D:\ ^| C:\ xlj" to search for folders containing "xlj" in both the D and C drives, but the result was only one item, which was the same as when using "es -n 300 -path D:\ xlj".
When I used "es -n 300 -path C:\ xlj", I was able to find two results.
I also tried the "`|" , and the result was also empty.
Did I make a mistake in some part of it?
Re: How to Use ES to Search Only for Files with Keywords in the Filename?
-path only allows one folder.
avoid using -path
avoid using -path
es -n 300 D:\ ^| C:\ xlj
-
- Posts: 8
- Joined: Thu Aug 15, 2024 3:32 am
Re: How to Use ES to Search Only for Files with Keywords in the Filename?
Really quick, brother! You're really supportive. What would be the impact if I don't use the path option?
Re: How to Use ES to Search Only for Files with Keywords in the Filename?
none.
Please add a trailing backslash to your paths.
For example, if you search for:
"C:\Program Files"
This would match files in C:\Program Files (x86)
Instead use:
"C:\Program Files\"
Examples:
Please add a trailing backslash to your paths.
For example, if you search for:
"C:\Program Files"
This would match files in C:\Program Files (x86)
Instead use:
"C:\Program Files\"
Examples:
es D:\xlj\ERP2022\ ^| D:\xlj\360se6\ ^| D:\xlj\IISDir\