Thursday, September 18, 2008

Create Many Folders At A Time

Creating several folders at once -- including the subfolders within those new folders require just a very simple 3-line batch file....

* Open Notepad ==> Type @echo off in the first line ==> Press
<Enter>

* Now type in the second line set /p name="Type folder name(s):"


* Press <Enter>

* In the third line type md %1\%name% ==> Press
<Enter>

This third line creates a new folder using 'md' or 'make directory'
command in the current folder(%1\) using items that you have entered and stored
inside the variable (%name%)



* Click File ==> Save ==> Navigate to the folder where you store your
batch files , type a name like make_directory.cmd ==> Save it


Now to add the batch file to the right click menus for folders....

* Open a folder or <Windows>-E

* Tools ==> Folder Options ==> File Types

* Scroll through the list of 'Registered File Types' and select 'File
Folder'


* Click 'Advanced' to open 'Edit file type' dialog box and click
'New' Button


For 'Application' used to perform action, type the complete file path and the name of your batch file followed by a space and "%1"

Eg: d:\apps\batch\make_directory.cmd "%1"

* Click Ok ==> Ok

In case you make a mistake while entering text in the new Action dialog box, you have to use Registry editor to fix it.

With the registry backed up ,

* Click Start ==> Run ==> Regedit ==> <r%gt;

* Select HKEY_CLASSES_ROOT\Directory\Shell

* Select folder with the name of the command you just added

* Double click the icon in the right pane to open the command line in the
'Edit String' dialog box and make changes


To delete the custom command altogether, close the dialog box,

* Right click the folder in the left pane ==> Delete

* Click 'Yes'


Please Comment!!!

No comments: