How to create folders named con lpt1 com1 prn in windows ?

Following names are consider as a device / port in DOs. DOS devices cannot be used as folder names:

CON, PRN, AUX, CLOCK$, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9.

so creating a folder in above names are not possible in windows.

But we can create them with some simple tweaks...

steps as follows .

From command line

to create a folder

mkdir \\.\d:\con (this will create con folder in "D" drive)

use the same method to delete the folder

rmdir \\.\d:\con (this will delete con folder from "D" drive)

4 comments:

jeri July 6, 2009 at 12:27 PM  

Please correct the following
rmdir \\.\d:\con (this will delete con folder from "D" drive)

with

rd \\.\d:\con (this will delete con folder from "D" drive)

Albin Sebastian July 6, 2009 at 12:35 PM  

Hi Jeri,

but both commands will work.

command "RD" and "RMDIR" will do the same function

New readers can try this command also

Thanks for the comment

Blogging In Web 2.0 Beta July 8, 2009 at 9:11 PM  

I Want to link Exchange with You If You Would Find it Worth Then please Let me Know My Blog is http://eknol.blogspot.com/ With A Page Rank of 3. If Possible Than Use Title Blogging Tips,Tricks & Hacks

Hapi July 11, 2009 at 5:00 AM  

hello... hapi blogging... have a nice day! just visiting here....

Get updates via Email :