Tuesday, 28 June 2011

How to create a folder with any name or create a con, prn, nul, lpt1~9, com1~9 folder

0 comments
Process to Create a New Folder and Rename it:
E.g. a) right mouse click- > new- > new folder
      A folder will be created with name “new folder”.
We can also change its name (right mouse click- >rename- >give a new name to the folder Suppose “xxx” or simply press F2 and give a new name) Now the name of the folder changes from “new folder” to “xxx”

b) We can also create a folder by command prompt
For this open command prompt (  + R- > type “cmd”- > hit enter )
E.g. It will display the command prompt screen-
           C :\
Use “mkdir” command to create a folder.
C:\>mkdir [path where to create the folder]\folder name then hit enter
E.g. suppose you want to create the folder having name “xxx” inside the folder “zzz” in d: drive.
Then type     
C:\>mkdir d:\zzz\xxx
c) We can also change the folder name by command prompt.
For this open command prompt ( + R- > type “cmd”- > hit enter)
E.g. It will display the command prompt screen-
          C :\>
Use “rename” command to change the name of the folder
C:\>rename [path of the folder whose name to be change] [new name of the folder]
E.g. suppose you have to change the name of the folder “xxx” to “rock” which is present inside the folder
“zzz” in d: drive. Then type
C:\>rename d:\zzz\xxx rock

But, there are some exception, we can’t create a folder with those name in the above two process
Some of those names are:-
Con
Prn
Nul
Lpt1
Lpt2
Lpt3
Lpt4
Lpt5
Lpt6
Lpt7
Lpt8
Lpt9
Com1
Com2
Com3
Com4
Com5
Com6
Com7
Com8
Com9

If we try to create folder with those names it will not created or if we try to rename any other folder to those name it will Not be change. This will display a message “the specified device name is invalid” or “the directory name is invalid”.We can also create those folders by command prompt. Only we have to make some correction on the path of the folder where We have to create the folder.

Steps for creating the folder with those exception name :
Step1:-
                For this open command prompt ( + R- > type “cmd”- > hit enter)
E.g.              It will display the command prompt screen-
                       C :\>
Step2:-
              Type mkdir\\.\[path where to create the folder]\[folder name] then hit enter
   e.g. Suppose we have to create a folder with name “con” inside the folder “zzz” in d: drive. Then type     
C:\>mkdir\\.\d:\zzz\con
Then a folder with name “con” will be created inside the folder “zzz” in d: drive.
We can use any other name instead of “con” to create a folder with that name & also change the path of the folder.

NOTE:-
 In general process these folders are also not deleted.
To delete this folder use “rd” command.

e.g.  To delete previously created con folder type
     C:\>rd\\.\d:\zzz\con

Other Similar articles that may interest you:
1.Add Disk Defragment option to context menu as a shortcut
2. How to Remove the Arrow from the shortcut Icons
3. Add Start Command Prompt from here to Context menu as a shortcut
4. Latest VLC Media Player Keyboard shortcuts
5. Add Window Colorization option to Context menu as a shortcut
6. Add Appearance Setting to Context menu As a shortcut
7. Add Administrative tool option to context menu as a shortcut
8 Add a warning or Legal notice before the Log-in Screen of Windows
9. How to break a BIOS/CMOS Password
10. Customize Winrar Commands on Context menu

Leave a Reply

Followers