Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CMD: File tasks, open directory and select file

I want to open a folder and automatically select a file from the command line:

>> explorer C:\Windows\system32\selected_file.txt

Once Windows Explorer has opened C:\Windows\system32 I want selected_file.txt to be highlighted automatically. Is that possible with Windows Command Prompt?

like image 617
Thom Avatar asked Apr 30 '15 14:04

Thom


People also ask

How do you select something in cmd?

Different shortcuts allow you to select text a character, a word, a line, or even a whole screen at a time. Ctrl+A: Selects all text on the current line. Press Ctrl+A again to select all text in the CMD buffer. Shift+Left Arrow/Right Arrow: Extend current selection by one character to the left or right.


1 Answers

explorer.exe /select,c:\windows\system32\selected_file.txt

See https://support.microsoft.com/en-us/kb/130510

like image 132
Tony Hinkle Avatar answered Nov 15 '22 08:11

Tony Hinkle