Get contents of multiple folders

General discussion related to "Everything".
Post Reply
ALEV
Posts: 4
Joined: Sun Mar 30, 2025 6:28 pm

Get contents of multiple folders

Post by ALEV »

I need a command line that will retrieve the contents of the folders:
"d:\Install Android\"|"d:\Install\"|"d:\Soft\- *\"
With extensions:
*.7z|*.apk|*.apks|*.exe|*.iso|*.msi|*.rar|*.xapk|*.zip
And the result - the full path to the file - should be output to a text file:
D:\-\log.txt
void
Developer
Posts: 19830
Joined: Fri Oct 16, 2009 11:31 pm

Re: Get contents of multiple folders

Post by void »

Code: Select all

es "d:\Install Android\"`|"d:\Install\"`|"d:\Soft\- *\" ext:7z;apk;apks;exe;iso;msi;rar;xapk;zip -export-txt d:\-\log.txt
`| = escaped |

ES (Command Line Interface)
therube
Posts: 5711
Joined: Thu Sep 03, 2009 6:48 pm

Re: Get contents of multiple folders

Post by therube »

Typo:

`| = escaped |

should be:
^| = escaped |


so you should be something like:

Code: Select all

es "d:\Install Android\"^|"d:\Install\"^|"d:\Soft\- *\" ext:7z;apk;apks;exe;iso;msi;rar;xapk;zip -export-txt d:\-\log.txt
AgentSam
Posts: 9
Joined: Sat Nov 16, 2024 7:45 pm

Re: Get contents of multiple folders

Post by AgentSam »

therube wrote: Wed Apr 09, 2025 6:29 pm Typo:

`| = escaped |

should be:
^| = escaped |

Thanks. When I first saw that bactick escape, I thought to myself -- "Since when has the backtick been used as an escape character in the Windows CMD Command Prompt?"
NotNull
Posts: 5961
Joined: Wed May 24, 2017 9:22 pm

Re: Get contents of multiple folders

Post by NotNull »

backtick (`) is for PowerShell commands; caret (^) is for CMD.
Post Reply