Thursday, 25 April 2013

Reason Behind the Con Folder Creation in Windows

We all know that we can't create Con, Folder in windows. not only con but also " PRN, AUX, CLOCK$, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9 and more".

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

Reason:

We can not create folder with con,aux, nul because these are reserved keywords used by DOS. 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.

Keywords and Their corresponding Functions:
Reserved KeywordsFunction
CONKeyboard and Display
PRNSystem list device, usually a parellel port
AUXAuxiliary Device,usually a serial port
NULBit-Bucket Device
A:-Z:Drive Letter
COM1First Serial communications port
COM2Second Serial communications port
COM3Third Serial communications port
COM4Fourth Serial communications port
LPT1First Parallel printer port
LPT2second Parallel printer port
LPT3Third Parallel printer port

No comments:

Post a Comment