Z:\Desc\How to start Windows Explorer with Folders on the left.txt <> ------------------------------------------------------------------------------ Target: %SystemRoot%\explorer.exe /n,/e,D:\Folders\ Start in: D:\Folders Quick Launch: C:\Documents and Settings\Sam\Application Data\Microsoft\Internet Explorer\Quick Launch\Explorer.lnk C:\WINDOWS\explorer.exe ------------------------------------------------------------------------------ Switches /n: Opens a new window in single-paned (My Computer) view for each item selected, even if the new window duplicates a window that is already open. /e: Uses Windows Explorer view. Windows Explorer view is most similar to File Manager in Windows version 3.x. Note that the default view is Open view. /root,: Specifies the root level of the specified view. The default is to use the normal namespace root (the desktop). Whatever is specified is the root for the display. /select,: Specifies the folder to receive the initial focus. If "/select" is used, the parent folder is opened and the specified object is selected. D:\Desc\!Clips\Windows Explorer\ --- --- --- --- --- --- /n ClipParm = "C:\WINDOWS\explorer.exe|/n||Start_Up|" RC = Shell("D:\!!VB\JXPF System\ClipLink.exe " + ClipParm) >> D:\Desc\!Clips\Windows Explorer\Explorer Options - N.jpg --- --- --- --- --- --- /e ClipParm = "C:\WINDOWS\explorer.exe|/n,D:\Folders\||Start_Up|" RC = Shell("D:\!!VB\JXPF System\ClipLink.exe " + ClipParm) >> D:\Desc\!Clips\Windows Explorer\Explorer Options - E.jpg --- --- --- --- --- --- /root ClipParm = "C:\WINDOWS\explorer.exe|/root,D:\!Music\MP3s||Start_Up|" RC = Shell("D:\!!VB\JXPF System\ClipLink.exe " + ClipParm) >> D:\Desc\!Clips\Windows Explorer\Explorer Options - Root.jpg --- --- --- --- --- --- /select ClipParm = "C:\WINDOWS\explorer.exe|/select,D:\||Start_Up|" RC = Shell("D:\!!VB\JXPF System\ClipLink.exe " + ClipParm) >> D:\Desc\!Clips\Windows Explorer\Explorer Options - Select D.jpg ClipParm = "C:\WINDOWS\explorer.exe|/select,D:\Desc||Start_Up|" RC = Shell("D:\!!VB\JXPF System\ClipLink.exe " + ClipParm) >> D:\Desc\!Clips\Windows Explorer\Explorer Options - Select D Desc.jpg ClipParm = "C:\WINDOWS\explorer.exe|/e,/select,D:\Desc||Start_Up|" RC = Shell("D:\!!VB\JXPF System\ClipLink.exe " + ClipParm) >> D:\Desc\!Clips\Windows Explorer\Explorer Options - E Select D Desc.jpg --- --- --- --- --- --- ClipParm = "C:\WINDOWS\explorer.exe|/n,/e,D:\Folders\||Start_Up|" RC = Shell("D:\!!VB\JXPF System\ClipLink.exe " + ClipParm) >> D:\Desc\!Clips\Windows Explorer\Explorer Options - N E Folders.jpg --- --- --- --- --- --- ClipParm = "C:\WINDOWS\explorer.exe|/e,D:\Folders\||Start_Up|" RC = Shell("D:\!!VB\JXPF System\ClipLink.exe " + ClipParm) ------------------------------------------------------------------------------ x = Shell("EXPLORER.EXE /n, /select, " + ClipFile, 3) ------------------------------------------------------------------------------ On Error Resume Next ClipFile = Clipboard.GetText(1) RC = JXPF_Dir_Exists(ClipFile) x = Shell("EXPLORER.EXE /n, " + ClipFile, 3) 'SendKeys "%{v}g", True ' Send ALT+VG (View, Large ICONs) 'SendKeys "%{ }r", True ' Send ALT+VG (View, Large ICONs) 'MsgBox "Alt+Spacebar R-Restore" On Error GoTo 0 ------------------------------------------------------------------- http://support.microsoft.com/kb/130510 "Command-Line Switches for Windows Explorer" SUMMARY This article lists command-line switches you can use when you start Windows Explorer (EXPLORER.EXE). MORE INFORMATION Syntax EXPLORER.EXE [/n][/e][,/root,][[,/select],] Switches /n: Opens a new window in single-paned (My Computer) view for each item selected, even if the new window duplicates a window that is already open. /e: Uses Windows Explorer view. Windows Explorer view is most similar to File Manager in Windows version 3.x. Note that the default view is Open view. /root,: Specifies the root level of the specified view. The default is to use the normal namespace root (the desktop). Whatever is specified is the root for the display. /select,: Specifies the folder to receive the initial focus. If "/select" is used, the parent folder is opened and the specified object is selected. --- --- --- --- --- --- Examples To open a Windows Explorer view to explore only objects on \\, use the following syntax: explorer /e,/root,\\ To view the C:\WINDOWS folder and select CALC.EXE, use the following syntax: explorer /select,c:\windows\calc.exe --- --- --- --- --- --- Keywords: KB130510 Keywords: win95 ntui prodnt svrwksta wpp95 Article ID: 130510 Last Review: January 19, 2007 Revision: 1.4 ============================================================================== [winnt] Explorer Command-Line Syntax The general form for entering Explorer commands from the console is Explorer [/n][/e][,/root,][[,/select],] where: /n opens Explorer with object view only; /e opens Explorer with tree view and object view at the current folder; /root, opens Explorer at the specified root level; /select, specifies which object (a file, folder or volume) gets the focus. The select parameter may not work in certain IE4 installations. Some "stupid" Explorer tricks: Explorer .. will open Explorer one directory above the current directory. Explorer \ will open Explorer at the root directory (usally C:\). Note that most of these commands also apply to Shortcuts and the Run dialog as well. One Explorer command that works only in the Run dialog consists of a single period ("."). The "period command" is the same as Explorer \. COPYRIGHT NOTICE: Copyright© 1999 by Bryan D. Wilhite All rights reserved. No part of this material may be used or reproduced in any form or by any means, or stored in a database or retrieval system, without prior written permission of the publisher except in the case of brief quotations embodied in critical articles and reviews. Making copies of any part of this material for any purpose other than your own personal use is a violation of United States copyright laws. LEGAL DISCLAIMER: The information provided by Bryan D. Wilhite at kintespace.com is provided "as is" without warranty of any kind. In no event shall Bryan D. Wilhite or any of his affiliates be liable for any damages whatsoever including, but not limited to, direct, indirect, incidental, consequential, loss of business profits or special damages due to material published by Bryan D. Wilhite or any of his affiliates. ============================================================================== http://www.skwc.com/beyond/explorer.html Advanced Explorer Settings Our introduction to Windows 95 File Management in the Guide to Windows 95 covers the basic functions of My Computer and Windows Explorer: copying, moving, deleting files, etc. But Windows Explorer has a lot more power waiting to be used, and we're going to cover some of its advanced features here. Did you know that My Computer and Windows Explorer are two faces of the same program? Both point to the program file EXPLORER.EXE in the Windows folder. You can create a shortcut to this file and have it open either the single-pane My Computer view or the double pane Windows Explorer depending on the syntax you use for the command line. Command-Line Switches A desktop shortcut to Explorer is a handy item to have around. It can be even more useful if you edit the shortcut's command line to customize Explorer just the way you want it. To accomplish this, create a shortcut to Explorer on your desktop, right-click on that shortcut, and select Properties from the pop-up menu. When the properties sheet appears, click the Shortcut tab. The shortcut's command line appears near the middle of this tab, next to Target: (see below). As you can see, the command line for this shortcut is C:\WINDOWS\EXPLORER.EXE (assuming your Windows directory is the default C:\WINDOWS). This string opens the two-pane Windows Explorer with all the drives on your computer displayed in the left-hand pane and the root directory of your C: drive open in the right-hand pane. The standard Explorer view. Perhaps you do most of your file management on a network drive mapped to drive J: on your computer or you have a directory called C:\Projects where you save all your work. In such cases, you might prefer a different startup directory for Explorer. No problem. All you need to do is add the path to the startup directory of your choice to the end of the shortcut's command line string. So, this would become: C:\WINDOWS\EXPLORER.EXE /E,J:\ to open Explorer to the J: drive or C:\WINDOWS\EXPLORER.EXE /E,C:\Projects to open Explorer to C:\Projects. You can replace these example strings with the directory into which you want Explorer to open at startup. As you can see, the syntax for this is C:\WINDOWS\EXPLORER.EXE /E,object where object is the path of your preferred startup directory for Explorer. The /E switch which preceded that object specified that you wanted to open an Explorer window rather than a single-pane My Computer window. When you specify an object as we did in the Explorer command line, the view defaults to a My Computer window without the /E switch. Another useful command line switch is the /ROOT switch. By default Explorer displays all the drives on your computer with the Desktop as the root (top level). Perhaps you have a number of subdirectories in that C:\Projects directory where you do all your work. You want to reduce the clutter in the Explorer window by having Explorer display only the Projects folder and its subfolders, eliminating all the other drives and folders from this view. In such a case, you could edit the shortcut's command line as follows: C:\WINDOWS\EXPLORER.EXE /E,/ROOT,C:\Projects This is similar in effect to using the Explore From Here Powertoy. As you can see, the syntax here is C:\WINDOWS\EXPLORER.EXE /E,/ROOT,object with object in this case being the folder which will be the top level in the left pane of the Explorer window. In addition to specifying the top level folder in that particular Explorer view, you can also specify which of its subfolder will be initially open in the right-hand pane (similar to the startup directory in our first example. If, for example, you do most of your work in C:\Projects, and want the initial directory in the right pane to be C:\Projects\Invoices you would use the command C:\WINDOWS\EXPLORER.EXE /E,/ROOT,C:\Projects,Invoices In this case, the syntax is C:\WINDOWS\EXPLORER.EXE /E,/ROOT,object,subobject with object being your preferred root directory and subobject being the preferred directory open in the right-hand pane when Explorer opens. Finally, you can designate a folder to be selected, but not opened, in the right-hand pane when Explorer opens by using the /SELECT switch. For example, to open Explorer to the default view with the C:\Projects directory highlighted but not opened in the right-hand pane, the command would read as follows: C:\WINDOWS\EXPLORER.EXE /E,/SELECT,C:\Projects The syntax being: C:\WINDOWS\EXPLORER.EXE /E,/SELECT,object in which object is the directory you wish to be initially selected when Explorer opens. In this example, a quick stab at the Enter key after Explorer opens would open C:\Projects. Of course, you can use the /SELECT switch in conjunction with the /ROOT switch. For example C:\WINDOWS\EXPLORER.EXE /E,/ROOT,C:\Projects,/SELECT,Invoices would open an Explorer window with C:\Projects as the top level folder and C:\Projects\Invoices selected but not opened in the right-hand pane. In this final example our syntax would read: C:\WINDOWS\EXPLORER.EXE /E,/ROOT,object,/SELECT,subobject Here's a switch which opens Explorer with every drive on your computer displayed in both the left and right panes: C:\WINDOWS\EXPLORER.EXE /E,/ROOT,,/SELECT,C:\ ============================================================================== The Explorer Command Line Continued from Editing the Start Menu To input command lines manually for shortcuts like the one above (C:\WINDOWS\EXPLORER.EXE /e, /ROOT, C:\WINDOWS\START MENU), you must know Explorer's command line switches. The full syntax of the Explorer command is documented in the Windows 95 Resou If EXPLORER.EXE is called with no successive commands or with the /e switch, Windows Explorer is launched just as it would be from the Start Menu. If there are other commands but the /e switch is not used, the specified folder will open on your Deskt The /ROOT switch specifies the top folder level that Explorer's tree will display. The default ROOT is Desktop, which includes all the files on your machine and your network (My Computer and Network Neighborhood). To change the default, follow /ROOT The filenames in an Explorer command line can be full UNC (Universal Naming Convention) pathnames, which allows access to network resources not mapped to local drives. ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------