Windows Explorer Hacks
by Mitch Tulloch, author of Windows Server Hacks
12/21/2004
No to All, Please
Let's say you need to copy a bunch of files from one folder into another and the destination folder has older versions of some of the files. For example, say you've written a book and have revised several of the chapters, and now you want to copy those chapters to a backup folder in which you store duplicate copies of everything you're working on. If you don't care about keeping the old versions of your chapters, you can select Yes to All when asked whether to overwrite the older files in your backup folder:
But what if you don't want to overwrite the older versions? In that case, you could click on the No button each time the above dialog box appears. But if you're copying a number of files and there are lots of potential overwrites, then you'll be sitting there clicking on No for quite some time and muttering, "Why didn't they include a No to All button on this thing?" Fortunately, there's a way around this problem: hold down the Shift key when you click on No. This prevents Windows Explorer from overwriting any files that have the same name in the destination folder, which essentially achieves the same effect as if a No to All button were included.
Take Command with the Command Line
The usual way of starting Windows Explorer is from the GUI. I find Start -> All Programs -> Accessories -> Windows Explorer pretty tedious, so I pin Windows Explorer to the Start menu like this instead:
Start -> All Programs -> Accessories ->
right-click on Windows Explorer -> Pin to Start menu
Now I can start Windows Explorer simply with Start -> Windows Explorer, which is better. But by using the command line to start explorer.exe, you can do even more, since this gives you the option of adding various switches to customize how the tool works. For example, if you want to open Windows Explorer without the Folders list (left pane) then type explorer /n to do this. Similarly, explorer /e starts Windows Explorer with the Folders list visible.
Both of these methods start Windows Explorer with the focus on the C: drive, however. What if you want to start Explorer with the focus on the C:\Windows folder instead? In that case, you would type either explorer /n, /root,c:\windows or explorer /e, /root,c:\windows depending on whether you want to display the Folders list (note the commas between the switches). Or, for even more flexibility, you can use environment variables; for example, explorer /root,%windir% and so on. Type set at a command prompt to view a list of environment variables you can use.
Finally, let's say you want to add an entry to your HOSTS file, which is found in your C:\Windows\system32\drivers\etc folder. Here's a quick way to open Windows Explorer with the \etc folder selected in the Folders list:
explorer /e, /root,c: /select,c:\windows\system32\drivers\etc