6

From the command line, is possible to launch Windows Explorer (explorer.exe) and automatically select multiple files in it?

I know how to launch it and select a single file (see doc):

explorer /select,"C:\myfile.text"

But, I can't find how to select a list of files.

3 Answers 3

2

This answer from stackoverflow might help. It would appear that it's not easily done (or even possible?) from the command line.

0

I was searching for this functionality in threads like this and ended up writing functionality myself: windows-explorer-files-selector and placed it in github. Feel free to use https://github.com/aurire/windows-explorer-files-selector. Right click a text file containing a list of files to be selected and hit select files. It is possible to use it as windows shell extension (right click on text file) or simply from command line. Command line usage would be path to executable and file with a list of files to be selected (either full paths, or filenames, but in that case run command from that directory):

windows-explorer-file-selector.exe file-names-list.txt

2
  • Welcome to Super User! Please read How do I recommend software in my answers? paying particular attention to the items in bold. After doing so, please edit your answer so it follows the guidelines.
    – robinCTS
    Jun 24, 2018 at 17:49
  • Is it possible to do this entirely (or at all) from the command line?  You seem to be presenting a GUI-based solution. Please do not respond in comments; edit your answer to make it clearer and more complete. Jun 24, 2018 at 17:59
0

I found this command line tool, works great.

OpenFolderAndSelectItem

Tiny EXE to open folder and select a file/folder in Windows Explorer.

Supported OS

  • Windows XP to Windows 11

Tiny overhead

  • 3.0KB EXE for 32-bit Windows (i386)
  • 4.5KB EXE for 64-bit Windows (AMD64)
  • No additional DLL/redistribute/runtime needed

Easy to use

Open "C:\Windows" and select "System32" folder.

OpenFolderAndSelect.exe "C:\Windows\System32"

Open "C:\Windows\System32" and select "cmd.exe".

OpenFolderAndSelect.exe "C:\Windows\System32\cmd.exe"

Open "C:\Windows\System32" and select all items where name ended with ".exe".

OpenFolderAndSelect.exe "C:\Windows\System32\*.exe"

Open "C:" and select two folders ("Program Files" and "Windows").

OpenFolderAndSelect.exe C:\ "Program Files" Windows

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .