How To

Some reserved keywords that are used by windows operating system

Spread the love

You may heared about reserved words in progrmming language, reserved words are terms or phrases appropriated for special use that may not be utilized in the creation of variable names. For example, “print” is a reserved word because it is a function in many languages to show text on the screen.

Did you know that there are some words in windows that you cannot use? Here’s what you will do, try to create a folder and rename it to CON or AUX, what you’ll see is when you hit enter, the folder name will revert back to “New Folder”. The reason? this are reserved words. Reserved words are widely used during the DOS era and didn’t change those properties until now. Here are the Windows reserved words:

Here i am going to explain why you can not create the con folder in windows.

We can not create folder using these reserved words.So if we are allowed to create such folder, then there will be an ambiguity in where to write data when the data is supposed to go to the specified devices.
For Example :- 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.

Keywords and Their corresponding Functions:

Reserved Keywords                 Function
CON                                     Keyboard and Display
PRN                                      System list device, usually a parellel port
AUX                                      Auxiliary Device,usually a serial port
NUL                                      Bit-Bucket Device
A:-Z:                                      Drive Letter
COM1                                   First Serial communications port
COM2                                   Second Serial communications port
COM3                                   Third Serial communications port
COM4                                    Fourth Serial communications port
LPT1                                       First Parallel printer port
LPT2                                       second Parallel printer port
LPT3                                       Third Parallel printer port

Leave a Reply

Your email address will not be published.