|
Copy the
MS-DOS Prompt.PIF shortcut from your C:\Windows\Start Menu\Programs
folder and type C:\Windows\Explorer.exe on both the Cmd line
and the Batch file line. Select Minimized on the Run
line and check Close on exit. As an example, add a space and /E,C:\Program
Files to the end of the Batch file line. The first Explorer
window will open with the Program Files folder expanded and the
second window will open with the C:\ root directory expanded. The
only drawback is that the second window will open with a default size and
position.
Below, is an explanation of Explorer's command-line syntax originally written by Greg Wolking [ZDNet]. Some examples contain spaces in order to format properly on this page, so you may need to remove them if you copy and paste. EXPLORER [/E, | /N,]pathspec[,/ROOT,rootspec] [,/SELECT,filespec] Note that _only_ commas, not spaces, separate all switches and arguments. Therefore, it is not necessary to quote file or path names that include "reserved" characters. Command line is not case-sensitive, and order of arguments is not important. The pathspec and rootspec arguments must point to a folder. The filespec argument can point to either a folder or a file. /E = Opens a new explorer view window. /N = Opens a new folder view window. Otherwise, if a folder view of the specified folder is already open, simply activates that window. /E overrides /N. pathspec = target path to open. Appears as the window caption in folder view. In explorer view, tree in left hand pane is open to the specified folder. This argument is ignored if the /SELECT,filespec option is used. /ROOT,rootspec = User cannot navigate any higher in the directory tree than rootspec. When this option is used, pathspec or filespec must be relative to rootspec. /SELECT,filespec = opens desired view with specified object (file or folder) selected. If used, pathspec is ignored (it defaults to the parent folder of filespec). Note that when /ROOT,rootspec is used, then both pathspec and filespec must be relative to rootspec, regardless of the order in which the parameters are specified. For example,: EXPLORER /E,SYSTEM,/ROOT, D:\WINDOWS,/SELECT,SYSTEM\SHELL32.DLL EXPLORER /E,/SELECT,SYSTEM\SHELL32.DLL,/ROOT, D:\WINDOWS both do exactly the same thing: Open an Explorer view with the tree limited to D:\WINDOWS or below, the left pane opened to the D:\WINDOWS\SYSTEM folder, and the file SHELL32.DLL selected in the right pane. Changing /E, to /N, would open a new folder view of D:\WINDOWS\SYSTEM with SHELL32.DLL selected, and the user could navigate no higher in the tree than D:\WINDOWS. However, EXPLORER /ROOT,D:\WINDOWS,/SELECT, D:\WINDOWS\SYSTEM\SHELL32.DLL would fail because "D:\WINDOWS\SYSTEM\SHELL32.DLL" is an explicit path, not a relative path.
PC Magazine Utilities and source code written by -RAE-
This page is located online at: Open Two Explorer Windows at Once Copyright © 2000 - 2010 Richard A. Ellingson |