impossible Folders..
Try to create a folder in Windows with either of these names --
"con" or 'prn' or "nul" or "Aux" or "Lpt1"
Windows will not let u create ....
Reason: all this correspond to some of the famous ports
>con corresponds to the console
>Lpt1 corresponds to printer and so on..
Now do this.. by me
try passing these commands in command prompt:
mkdir \\.\\c:\\con
goto c: and find the folder is there..
explanation..
these words are reserved for DOS devices
like con is for console/keyboard
lpt for printer
1) Ever tried to create a folder or file with a name ending with dot(.), like- "abc.txt." or "myfolder." ??? Be it explorer or command prompt or CreateFile(), it does'nt work.
2) Attempts to create folder or files with name "con" lead to failure. And this is not merely confined to "con" only. Here is a big list of such names(infamous reserved device names)-
"
PRN, AUX, CLOCK$, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9
"
3)On a command prompt u trigger following commands-
mkdir c:\\\\test1
mkdir c:test2
mkdir c:\test2\\\\\\abc.txt
and u see that each of the command works perfectly, even though each appears to be a incorrect pathname(due to some extra and missing backslashes).
All those above mentioned restrictions can be overcomed using the escape sequence "\\?\".
U can see these working on cmd now-
****************************************************
mkdir \\?\c:\myfolder. (Folder with a dot in end)
mkdir \\?\c:\com1 (Folder with a reserved name)
****************************************************
and U can see these failing on cmd now-
****************************************************
mkdir \\?\c:\\\\test1
mkdir \\?\c:test2
mkdir \\?\c:\test2\\\\\\abc.txt
****************************************************
No comments:
Post a Comment