3 ms·
Yeah, CON is a device name (console), like LPT1, COM1, PRN, or NUL. See: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#naming
by da_chicken 8y ago
Yeah, CON is a device name (console), like LPT1, COM1, PRN, or NUL.
See: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#naming_conventions https://msdn.microsoft.com/en-us/library/windows/desktop/aa3...
An old DOS trick to create a file is to run "copy con newfile.txt" and hit enter. Then you can start typing the file's contents. I don't recommend trying to use backspace or delete since it doesn't always work like you think, depending on your shell. When you're done, hit F6 or Ctrl+Z followed Enter. It still works in cmd.exe.
Similarly, you can create an empty file with "copy nul newfile.txt" or test copy a file with "copy filename.txt nul".