New folders made simple


Tip
Considering how often some of us make new folders, it seems odd Microsoft hasn't made the chore simpler. First, you have to open the folder where the new folder will reside - you can't create one in Explorer's tree pane. Next, you wrangle with submenus: either choose File-New-Folder or right-click in the file window and choose New-Folder.

Wouldn't it be easier if you could just right-click on a folder in the tree and choose New folder from the menu? Fortunately, this is one feature that you can add yourself.

1. First, open Explorer to a folder where you normally store batch files. In this example, we'll use the Windows folder. Right-click in the file list and choose New-Text Document.
2. Double-click on the new document to open it in Notepad and create a batch file that contains these two lines:
@echo md %1\%%1 > c:\ windows\makdir.bat
start "c:\windows \makdir .pif"
This copies the DOS make directory (md) command and the currently selected directory (%1) plus a placeholder (%%1) into a new batch file (makdir.bat). Adjust the paths if you prefer to store your batch files in a folder other than Windows. Save the file with a name like foldmakr.bat.
3. In Explorer, right-click the batch file you just created and choose Properties (or select it and press <Alt>-Enter). Click the Program tab, and select Minimized under Run. Check Close on Exit and click OK.
4. In the same folder, look for a newly created file with the same name as your batch file but with the extension .pif (if your extensions are hidden, you'll recognise the file by its MS-DOS icon). Use the right mouse button to drag it to a blank area of the window, and choose Copy Here. Rename the copy makdir.pif (or makdir if extensions are hidden).
5. Right-click the copy and choose Properties (or select it and press <Alt>-Enter). Click the Program tab. In the box at the top, type a prompt such as Type a name for your folder. In the Cmd Line box, type c:\windows\makdir.bat ?. (Adjust the path and the file name to match the one you used earlier.) Leave the "Run", "Minimized" and "Close on exit" options the way they are and click OK.
6. In Explorer, choose View-Options and click the File Types tab. For "Registered file type", select Folder (not File Folder) and click Edit. Click New. For "Action", type New folder, or any other words that you want to appear on your pop-up menu. For "Application used to perform action", type c:\windows\foldmakr.bat. Then click OK and close the remaining dialogue boxes.
7. To use your new menu command, just select a folder in Explorer's directory tree, then right-click and choose New folder (or whatever you called your new command). Type a folder name when prompted, and remember to enclose it in quotation marks if the name includes any spaces or is longer than the old 8-plus-3, as shown in the screen picture.
If you right-click a folder before selecting it, the command will still create a folder in that location - but you may have to refresh the directory tree (press <F5>) to see your new folder.

One other note: this command lets you make a new folder within an existing folder only. You can't use it to make a folder in the root of a drive.
- Scott Dunn


Category: Win95
Issue: Feb 1997
Pages: 168

These Web pages are produced by Australian PC World © 1997 IDG Communications