Issues on CON folder creation in Windows

Have you ever tried to create a folder named "con"(without quotes) in your windows system? If you tried it in Windows 7/vista, then it must appear like this.




Not only CON, we cannot create any of these
CON, PRN, AUX, CLOCK$, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9 and more

The reason is that con, prn, lpt1..lpt9, etc are underlying devices from the time dos was written. so if u r allowed to create such folders, there will be an ambiguity in where to write data when the data is supposed to go to the specified devices. In other words, if i want to print something, internally what windows does is -- it will write the data to the folder prn (virtually u can call it a folder, i mean prn, con, etc are virtual folders in device level). So if we are able to create con folder, windows will get confused where to write the data, to virtual con folder or real one.
How to create CON  folder in Windows?

SOLUTION 1:-
Open the Command prompt by Start -> Run and type cmd
Type the following command in your command prompt.
C:\> md \\.\c:\con





Now, Open My Computer and browse through the path where you created CON folder... Surprising.. ?? Yeah.. you have created it successfully

Now, try to delete the folder from My computer
OOPS!!! You cant delete it...
Now, try this in command prompt console

C:\> rd \\.\c:\con





EXPLINATION OF THIS:

Well, let us now have a glance at how we were able to create it...

It is just 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 did n't exist under pure DOS, they are not backward compatible. The UNC syntax for Windows systems is as follows..

\\RemoteHost\sharedfolder\resource

where RemoteHost is the computer name / IP address of the computer that you wish to connect through remotely for accessing shared folder. The rest is the path.

(Here \\remotehost\drive:\con doesn't make sense anyway, because without having a process on the remote host, there is no current 'console'). It would be a security hazard as well, having the serial and parallel ports accessible for everyone who is allowed to read or write in any single directory.

The "." in the command \\.\c:\con suggest the local server. Now, you are pointing to your own computer. since, you have all privilages on every folder of ur computer, you can easily create it.

NOW I hope it is clear to everyone that what is real mystery behind this.

SOLUTION 2:-


if you press alt+255 (or alt + 160 for some comp.systems) you get a blank character, after that you type 'CON' which consists of 3 characters.

' CON'

So there are total four characters (i.e 1.) Blank Character 2.) Letter 'C' 3.) Letter 'O' 2.) Letter 'N')

Now these four characters you have created does not match with the original three!

' CON' is not equal to 'CON' (notice the blank character in first keyword)

So this is how you can create CON folder.


Few sites for using computer in better way:-


www.microsoft.com




www.telecomhall.com




www.pcworld.com

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More