CLI and network shares

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
Rayearth
Posts: 1
Joined: Tue Apr 09, 2024 6:24 am

CLI and network shares

Post by Rayearth »

Everything's CLI (es.exe) doesn't seem to work on network shares for me. I'm trying to get files count and size but the result is always 0 when the reality is clearly not that simple.

Tried with mapped letter path and UNC as well - no change.

Code: Select all

es.exe -path "\\servername\path" -get-result-count
es.exe -path "\\servername\path" -get-total-size
Does CLI tool support network shares? I used standard Everything (gui) to index folders on the network so I assumed this would also work.
Last edited by Rayearth on Tue Apr 09, 2024 10:08 am, edited 1 time in total.
void
Developer
Posts: 16773
Joined: Fri Oct 16, 2009 11:31 pm

Re: CLI and network shares

Post by void »

Please try the following calls:

es.exe "\\servername\path" -get-results-count
es.exe "\\servername\path" -get-total-size

-path is not need if your search contains a \
-If you use -path, please make sure there's no space between the - and path
Rayearth
Posts: 1
Joined: Tue Apr 09, 2024 6:24 am

Re: CLI and network shares

Post by Rayearth »

Thanks for suggestion. The extra space was my typo here, as well as the extra 's' in -get-results-count.

Nevertheless these doesn't seem to work to me, even without -path:

Code: Select all

es.exe "\\servername\path" -get-result-count
es.exe "\\ip_address\path" -get-result-count
es.exe "Z:\path" -get-result-count
Last edited by Rayearth on Tue Apr 09, 2024 10:13 am, edited 1 time in total.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: CLI and network shares

Post by NotNull »

Rayearth wrote: Tue Apr 09, 2024 10:12 am these doesn't seem to work to me
Please specify what this exactly means. Do you get an error maeesage? System beeps? Reply is "0"?


ES.exe gets its results from the Everything database. Are the following paths indexed in Everything? I.e. Do you get results if you type them in the Everything search bar?

Code: Select all

"\\servername\path\"
"\\ip_address\path\"
"Z:\path\"
As an extra check:
What response do you get after running the followinbg command?

Code: Select all

es.exe  "C:\windows\"  -get-result-count


To add network folders to the Everything index, go to Menu => Tools => Options => Indexes => Folders and add your folder(s).
Rayearth
Posts: 1
Joined: Tue Apr 09, 2024 6:24 am

Re: CLI and network shares

Post by Rayearth »

The result is 0 for me. Same goes for

Code: Select all

es.exe  "C:\windows\"  -get-result-count
I don't have this path indexed in Everything. If this is a strict dependency then mystery solved (nice shot, NotNull) cause I don't have those network shares indexed neither.

Probably didn't get this clearly enough before. Was under impression that es.exe does the same as gui app, but with CLI.

In my case I have god knows how many files on external drives and network shares. Last time I received a hard drive with 11 kk files and wanted to count them and get a csv list. PowerShell couldn't go past 2 kk in my case. In my tests the Everything app managed a 5 kk files task in 5m30s but I wouldn't want to index these file repositories each time using gui. In most cases this is a one-time job for me to count files and size + get csv list with full names.

Any switch to index a path with a command line and remove path afterwards when it's not needed anymore?
Last edited by Rayearth on Tue Apr 09, 2024 8:47 pm, edited 1 time in total.
void
Developer
Posts: 16773
Joined: Fri Oct 16, 2009 11:31 pm

Re: CLI and network shares

Post by void »

I don't have this path indexed in Everything. If this is a strict dependency then mystery solved (nice shot, NotNull) cause I don't have those network shares indexed neither.
ES will only return indexed results.

ES communicates with the GUI app.
It's the GUI app that performs the search and returns the results to ES.


Any switch to index a path with a command line and remove path afterwards when it's not needed anymore?
Really tough to do with Everything 1.4.
You could do something with Everything 1.5 and a script.

It might look something like:

START "" Everything64.exe -instance "temp" -folders "c:\path\to\my folder" -no-auto-include -startup
ES -instance "temp" "c:\path\to\my folder" -timeout 60000
START "" Everything64.exe -instance "temp" -exit

-Adjust "c:\path\to\my folder" to your desired folders (can be a semicolon delimited list, could be %* inside a bat file etc..)
-Adjust the ES timeout as needed, it may take a few minutes to index certain folders.

Multiple instances
-folders
-no-auto-include
-startup
-exit
ES -instance
ES -timeout
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: CLI and network shares

Post by NotNull »

Another way might be using IndexThis.

With that:
  • right-click folder or drive in Explorer / other filemanager
  • Select the IndexThis entry
    A temporary Everything instance will be started, indexing the selected drive/folder
  • Wait untill Everything is done scanning (see statusbar)
  • Menu => File => Export (don't forget to choose the desired format of the export (EFU, txt, csv, ...))
  • Close the temporary Everything instance when done.
Post Reply