Saturday, April 28, 2012

Why can't we create a folder by name CON? by E.BALAMURUGAN

Gone are the days when computers had only CUI OS, that is, Character User Interface Operating Systems , like MS-DOS .nine years ago, Windows 95  was ruling. You could see Windows 98 here and there. We were in 8th standard, and working on a computer was like a dream coming true. Microsoft's Paint Brush was the only known (for us) GUI software and was the greatest means of entertainment. The instructors taught us only MS-DOS commands and how to Shut Down the computer. Remembering such weird names as DIR, CD, MD, RD, CHKDSK, FDISK, VER, ATTRIB, REN, DEL etc. along with their syntax and usage was a great accomplishment. But we had a problem understanding this: DOS has a separate dedicated command for every action; literally every action, except... creating a file!

Yes, we used COPY CON filename to create a file with name filename. Anyone can say that it is a form of COPY command. So, why was creating a file different than all other commands? didn't understand it, till found out how to print using DOS, almost four years later.

DOS uses different names for the attached devices, learnt. PRN was one such name. TYPE filename would display the contents of a file and TYPE filename > PRN would print it instead of displaying. Curiosity brings many hidden matters out. PRN would surely mean Printer and will redirect the output to the printer instead of console. Console (monitor) is the implicit default output device, and it can be bypassed if needed. So, how to put it explicitly? There must be some means to do that. Yes, there is! TYPE filename > CON performs exactly same function as TYPE filename. These special names for the devices really mean something special for the operating system and those names can not be used as folder or file namesCONPRNNULCOM1 to COM9LPT1 to LPT9, which stand for CONsole PRiNter NULl serial COMmmunication ports Line PrinTer ports .


Hi friends, in my previous posts, I told you some keywords which can't be given to a folder, i.e. a folder can't support those names. I am once again telling you those names through the image below:

Folder Rename Trick
Now, I am going to tell you how to create the folders which have the name like CON, PRN, AUX etc. I have twomethods for this.

METHOD: 1.
1. Create a new folder and rename it, type it's name as CON and press enter. You will see the following error and windows will deny to rename the folder.
creating a CON folder
2. Now once again, rename the folder as CON and press alt+0144 and then press enter.
creating a CON folder

Yuhu.... Your folder is now created.

In the same way, you can CREATE A FOLDER WITHOUT ANY NAME, just rename the folder and type nothing, just press alt+0144 and press enter. Now you will get an unnamed folder.
creating an unnamed folder


HOW TO DELETE THE FOLDER 
Simply select the folder and hit delete from your keyboard, or right click on the folder and click delete. That's it.

METHOD: 2.

1. Go to start menu and open command prompt. Simply type cmd in Run Box and press enter to open command prompt.
2. Now type MD \\.\D:\CON
Here, D: is the drive where we are going to create our folder. You can change the drive also, if you wish to change.
3. Check out the drive, you will see the folder with name CON.

HOW TO DELETE THE FOLDER
If you try to delete the folder created by this method, windows won't delete it normally. To delete this folder, follow the steps below:
1. Open CMD and type RD \\.\D:\CON
2. Check out the drive, your folder is deleted now.

Note: If you are facing any problem while deleting the folder, delete it from SAFE MODE of windows.


Thanks to source website 

No comments:

Post a Comment