+ 2
Why we can't create a folder named "CON" C without any special characterize only (ON) where in the computer??
TRY IT!!!!
2 Antworten
+ 9
Because "CON" is a DOS-special device file, like PRN, LPT1, COM1, NUL, etc.
c:\>copy con outputfile.txt
_ (start typing)
After this command, anything you type at the CONsole will be written (copied from the console) to that file.
Press Ctrl-Z* (sends ASCII 26 or END OF FILE in DOS/Windows consoles) to save.
You are NOT allowed to create files or folders having special device names.
* The same action is Ctrl-D (ASCII 4 : End of Transmission) on Unix/Linux-like systems.
Links:
~ https://en.wikipedia.org/wiki/Device_file#DOS,_TOS,_OS/2,_and_Windows
~ https://en.m.wikipedia.org/wiki/End-of-Transmission_character
+ 8
Here's a code showing that Windows considers CON to be a file that already exists everywhere (globally):
https://code.sololearn.com/cKtsVf3gEy6m/?ref=app