Ingat jangan kasih nama folder dengan nama2 berikut :
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
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 editing files in CVS that were sourced
on a Linux machine. I checked out the repository, but got errors for a
folder named ‘aux’. I ended up doing work on a Linux machine to get
around this, as there would be no way I would be able to work on the
files there from Windows.
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:
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:
knowledge, is there a practical use for this information? While
I can’t think of any, it’s good to know to avoidusing these, if doing
cross-platform development. Do not use these names on a file on
a Linux machine if they are going to be opened or edited by
Windows users! This includes files and directories with those names
but with an extension, such as aux.txt.
0 komentar:
Posting Komentar