Command-line for file-list?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
PeterPanino
Posts: 78
Joined: Sun Feb 21, 2016 10:26 pm

Command-line for file-list?

Post by PeterPanino »

Hello! I need to create a (recursive) file-list of all PDF files in a specific directory from a command line.

But this command line does not work:

Code: Select all

Everything.exe -create-file-list R:\found.txt D:\Downloads\*.pdf
And btw, the resulting file-list should not be in CSV format but a simple list of files where every line is a file-path.

How can I achieve this?

I use Everything-1.4.1.877.x86 Portable in Windows 7

EDIT: Even this command-line does not work:

Code: Select all

Everything.exe -create-file-list "R:\found.txt" "D:\Downloads" -create-file-list-include-only "*.mp4;*.mp3"
The resulting file-list contains always a list of ALL files in "D:\Downloads". The filter is not applied.
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Command-line for file-list?

Post by void »

Please try:
Everything.exe -create-file-list "R:\found.txt" D:\Downloads\ -create-file-list-include-only-files *.pdf
PeterPanino
Posts: 78
Joined: Sun Feb 21, 2016 10:26 pm

Re: Command-line for file-list?

Post by PeterPanino »

Hello,

this produces a list which contains not only PDF files but also ALL FOLDERS and SUBFOLDERS in "D:\Downloads\", even when they have not "PDF" in their pathname. But I need only PDF FILES.
PeterPanino
Posts: 78
Joined: Sun Feb 21, 2016 10:26 pm

Re: Command-line for file-list?

Post by PeterPanino »

The following command-line excludes folders:

Code: Select all

Everything.exe -create-file-list "R:\found.txt" D:\Downloads\ -create-file-list-include-only-files *.pdf -create-file-list-exclude-folders *
However, the list contains only the PDF files from the ROOT DIRECTORY of "D:\Downloads\". But I need all PDF files from all sub-directories of "D:\Downloads".
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Command-line for file-list?

Post by void »

Please try without the -create-file-list-exclude-folders *

Everything.exe -create-file-list "R:\found.txt" D:\Downloads\ -create-file-list-include-only-files *.pdf

alternatively, if you don't want folders, please try ES (the Everything command line interface)
ES.exe D:\Downloads\ *.pdf -export-efu R:\found.txt
PeterPanino
Posts: 78
Joined: Sun Feb 21, 2016 10:26 pm

Re: Command-line for file-list?

Post by PeterPanino »

void wrote:ES.exe D:\Downloads\ *.pdf -export-efu R:\found.txt
Thank you, this now works perfectly.

Two questions:

1. How can I instead get a simple text file (not CSV) which contains only a file-path per line (no Size,Date Modified,Date Created,Attributes CSV fields). Does ES.exe have command-line parameters for this?

2. Which are the EXACT steps to make ES.exe work on a computer where no Everything is installed?
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: Command-line for file-list?

Post by therube »

Adjust as needed:

Code: Select all

ES.EXE  -path  D:\Downloads  ext:pdf  -export-txt  R:\found.txt
ES.EXE  -path  D:\Downloads  *.pdf  >  R:\found.txt

> (no Size,Date Modified,Date Created,Attributes CSV fields)

Had you mentioned that before, I would have mentioned ES the other day.


2. ES piggy-backs on a running Everything, so Everything (the Everything Service at least) needs to be running (not necessarily the GUI). (Or if you're not using the Service, Everything would have to be open, running.)
PeterPanino
Posts: 78
Joined: Sun Feb 21, 2016 10:26 pm

Re: Command-line for file-list?

Post by PeterPanino »

therube wrote:

Code: Select all

ES.EXE  -path  D:\Downloads  ext:pdf  -export-txt  R:\found.txt
This works perfectly as desired, thank you!

therube wrote:

Code: Select all

ES.EXE  -path  D:\Downloads  *.pdf  >  R:\found.txt
Not sure about this one (it does not work). Is this the correct syntax?

Image
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Command-line for file-list?

Post by void »

Please try:
ES.EXE -path D:\Downloads *.pdf -txt > R:\found.txt

-txt will output only the full path and filename.
PeterPanino
Posts: 78
Joined: Sun Feb 21, 2016 10:26 pm

Re: Command-line for file-list?

Post by PeterPanino »

therube wrote:2. ES piggy-backs on a running Everything, so Everything (the Everything Service at least) needs to be running (not necessarily the GUI). (Or if you're not using the Service, Everything would have to be open, running.)
How can I:

1. Detect whether the Everything Service is installed

1a. Detect whether the Everything Service is running

1b. Start the Everything Service if it is not running

2. Install the Everything Service (not the Everything UI) unattended (silent) and make sure the Everything Service Startup Type is Auto.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Command-line for file-list?

Post by NotNull »

If you think about installing Everything, just to get a list of PDF files in a folder tree, there are alternatives:

In CMD:

Code: Select all

DIR /A /B /S D:\Downloads\*.pdf > R:\found.txt

Powershell:

Code: Select all

 (dir -path D:\Downloads -filter *.pdf -recurse -hidden).FullName | Out-File "R:\found.txt"

I think you are asking the wrong questions, but to give some directions:
SC.exe /? (on the CMD prompt) gives you options to query and configure services.
Everything.exe /? gives you (amongst other things) installation options, one of those for installing the Everything service.
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: Command-line for file-list?

Post by therube »

SC.EXE query everything
SC.EXE query everything | grep "RUNNING"
Post Reply