Sunday, July 18, 2004
By: Jason Doucette
Do you find it annoying to use the 'My Computer' shortcut as a file explorer-style application because the folder view is hidden by default? Or do you find it annoying that Windows Explorer never starts with the proper directory in focus? Well, stop being annoyed, because you can customize the shortcut to Windows Explorer to resolve all of these annoyances.
The following command line argument / switches are available for Windows Explorer (explorer.exe):
- /n
-
Opens a new single-pane Window for the default selection. This is usually the root of the drive on which Windows is installed.
- /e
-
Starts Windows Explorer using its default view.
- /e, <object>
-
Starts Windows Explorer using its default view with the focus on the specified folder.
- /root, <object>
-
Opens a window view of the specified object.
- /select, <object>
-
Opens a window view with the specified folder, file or program selected.
Right click a shortcut to Windows Explorer, and select 'Properties'. Go to the 'Shortcut' tab, and take a look at the 'Target:' edit box. Add the desired switches at the end of this command line.
Example
I personally like Windows Explorer to start in its default view (the double-pane view which shows the folder list, and the file list), with the C:\ drive as the default focus. I can accomplish this by changing my Windows Explorer shortcut to have the following command line:
%SystemRoot%\explorer.exe /e,C:\
Please note that I do not use the /root switch, as this would not allow me to navigate higher up than the C:\ drive. Thus, I would not have access to any other drive with this instance of the program! However, this switch would be useful if you never required access to another drive, as it saves some screen real estate. You can always create more than one shortcut to Windows Explorer, as well; each with their own settings.
Side Effects
One negative side effect of using a shortcut to Windows Explorer to access a directory, rather than merely using a shortcut to the directory, is that the Windows Explorer shortcuts will not appear within an open / save filebox. Why? As discussed in our forums, the shortcut to Windows Explorer is a shortcut to a program. The filebox code is only supposed to show the files that match the currently selected file type (such as *.doc), as well as directories for easier navigation. It is not supposed to show files of other types (such as *.bmp). The filebox also shows shortcuts to these types of files, if they match the file type selected. Therefore, a shortcut to a directory would be shown, and, in this particular case, a shortcut to a *.doc file would be shown. However, a shortcut to an executable file (*.exe) would not be shown. Since this is what the shortcut to Windows Explorer is, it will not appear. Besides, even if it did appear (it will if you select *.* to show all files), and the filebox allowed you to run it (it doesn't, it thinks you are selecting the filename of the shortcut for open / save), it would just open a new Windows Explorer program anyway - since it's a program, not a directory.
About the Author: I am Jason Doucette of Xona Games, an award-winning indie game studio that I founded with my twin brother. We make intensified arcade-style retro games. Our business, our games, our technology, and we as competitive gamers have won prestigious awards and received worldwide press. Our business has won $190,000 in contests. Our games have ranked from #1 in Canada to #1 in Japan, have become #1 best sellers in multiple countries, have won game contests, and have held 3 of the top 5 rated spots in Japan of all Xbox LIVE indie games. Our game engines have been awarded for technical excellence. And we, the developers, have placed #1 in competitive gaming competitions -- relating to the games we make. Read about our story, our awards, our games, and view our blog.