Header Ads

Create a Folder Name "con"

 Have you ever tried to create a folder named “con” on your windows xp or vista or any windows os ? You may have tried if somebody has challenged you to create one. You are told that you can’t create a folder named con on windows. But that’s not 100 % correct, We can create such folders but not following general ways.

Try to create a folder with any of these names CON, PRN, AUX, CLOCK$, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9 … You will not be successful if you go by general method of creating folder.
Why ?
When DOS was written, con, prn, etc were recognised as devices. So if such a folder could be created, there will be ambiguity about where the data should go, the virtual folder you created or the real devices (Since real devices are supposed to be virtual folders at device level).
How can we create folders with such restricted names ??
Some people advice you to create con named folder by fooling yourself :P by typing c then 0(zero) then n.. But lets get real ways..

Open the Command prompt by Start -> Run and typing cmd
C:> md \.c:con
then hit enter.

Replace the word con with any of the above-mentioned restricted/blocked folder names if you desire.
Now, Open My Computer and browse through the path where you created CON folder.(Drive C: in our case here). Hurray!!! we created it successfully. Now the next time, one can’t challenge us for this. Now try to delete the created folder. It won’t delete. Now try this in command prompt console (start  -  run  -  cmd)
C:> rd \.c:con
Its removed now…

Can you create con folder on windows xp ?
Why this method works ? How could it be created ?
Because of the UNC Path (Universal Naming Convention). The Universal Naming Convention, or UNC, specifies a common syntax to describe the location of a network resource, such as a shared file, directory, or printer.Since, these conventions didn’t exist under pure DOS, they are not backward compatible. The UNC syntax for Windows systems is as follows..
where RemoteHost is the computer name / IP address of the computer that you wish to connect remotely for accessing shared folder. The rest is the path.
(Here \remotehostdrive:con doesn’t make sense anyway, because without having a process on the remote host, there is no current ‘console’). It may be a security hazard as well because of the serial and parallel ports being accessible to  everyone who is allowed to read or write in any single directory.
The “.” in the command \.c:con suggest the local server. Now, we are pointing to our own computer. since, we have all privileges on every folder of your computer, we can easily create it through DOS mode(command console mode).   {credit for this explanation: Thinkdigit member}

No comments

Powered by Blogger.