Please see my other blog for Oracle EBusiness Suite Posts - EBMentors

Search This Blog

Note: All the posts are based on practical approach avoiding lengthy theory. All have been tested on some development servers. Please don’t test any post on production servers until you are sure.

Monday, February 28, 2011

Forbidden file and folder names on Windows

Here’s an interesting experiment. On a Windows desktop, right-click on the desktop, and create a new Folder. Then, try renaming it ‘aux’. Can’t do it, right? There are certain restricted words that cannot be used to name folders or files, even though they use regular characters. You can’t even name it, say, ‘aux.test’.
I came across this bug when creating the auxiliary database with the name AUX on windows.
The following are reserved names, which cannot be assigned to a folder or file (normally):
  • CON
  • PRN
  • AUX
  • CLOCK$ (NT and older)
  • NUL
  • COM1
  • COM2
  • COM3
  • COM4
  • COM5
  • COM6
  • COM7
  • COM8
  • COM9
  • LPT1
  • LPT2
  • LPT3
  • LPT4
  • LPT5
  • LPT6
  • LPT7
  • LPT8
  • LPT9
It’s not impossible to create a file with that name, however. You just need to break out the old command line. From a Windows XP box, open up a command window (Start->Run, type cmd) and try:
md \\\\.\\c:\\aux
Congratulations, you’ve just created a folder named ‘aux’! You can even browse to it in Windows Explorer. To break down what the above does: the md stands for “make directory”. Specifying \\.\c:\aux means (in UNC format) on the local machine, volume C:, folder aux.
However, you still can’t delete it from Windows Explorer. To do that, you have to go back to the shell:
rd \\\\.\\c:\\aux

No comments: