C:\_G\WWW\~ELISANET\INFO\tscmd155.html
<http://www.elisanet.fi/tsalmi/info/tscmd155.html>
Copyright © 2003- by Prof. Timo Salmi  
Last modified Sun 25-Nov-2018 14:56:53

 
Assorted NT/2000/XP/.. CMD.EXE Script Tricks
From the html version of the tscmd.zip 1cmdfaq.txt file
To the Description and the Index
 

This page is edited from the 1cmdfaq.txt faq-file contained in my tscmd.zip command line interface (CLI) collection. That zipped file has much additional material, including a number of detached .cmd script files. It is recommended that you also get the zipped version as a companion.

Please see "The Description and the Index page" for the conditions of usage and other such information.



155} How can I use command-line to open a Windows Explorer window?

The simplest format is just
explorer

To open a window view with the current file selected
@echo off & setlocal enableextensions
explorer /select,"%~f0"
endlocal & goto :EOF


To open multiple windows use e.g.
@echo off & setlocal enableextensions
explorer /select,"%~f0"
explorer /select,"C:\_D\TEST\CMDFAQ2.CMD"
endlocal & goto :EOF

E.g. the following command
Explorer /n,"C:\Documents and Settings"
will open a normal folder window view to C:\Documents and Settings
Explorer /e,/select,C:\WINDOWS\system32\cmd.exe
will open an extended folder window with cmd.exe selected.

There is a twist. What if you wish to open a zip-file in an explorer window?
C:\>rundll32.exe zipfldr.dll,RouteTheCall C:\_M\TestFolder\pakettig.zip


Even while this is not a desktop FAQ, let's observe the keyboad shotcut "Open File Explorer"

Or from Windows 10 Start

References/Comments: (If a Google message link fails try the links within the brackets.)
  http://support.microsoft.com/kb/314853/en-us
  http://support.microsoft.com/kb/307856/en-us
  http://support.microsoft.com/kb/555305/en-us
  Windows Explorer Command-Line Options
  Google Groups Fri, 08 Aug 2008 11:14:35 +1000 [M]

[Previous] [Next]

C:\_G\WWW\~ELISANET\INFO\tscmd155.html
C:\_G\WWW\~ELISANET\FTPCMD\TSALMI.CMD /tscmd155
http://www.elisanet.fi/tsalmi/info/tscmd155.html
file:///c:/_g/www/~elisanet/info/tscmd155.html