Special File Names Used by Windows

Q

What are special file names used by Windows?

✍: FYIcenter.com

A

Windows used a number of special file names referring to special resources in the system:

  • CON - Referring to the console: keyboard and screen. Reading from CON is reading from the keyboard. Writing to CON is writing to the screen.
  • PRN - Referring to the printer for writing output only.
  • AUX - Referring to the auxiliary device for reading and writing.
  • NUL - Referring to null device. Reading from NUL gets nothing, like an empty file. Writing to NUL goes nowhere, data will be lost.
  • COM1, COM2, ..., COM9 - Referring to serial port 1, 2, ..., 9 for reading and writing.
  • LPT1, LPT2, ..., LPT9 - Referring to serial parallel 1, 2, ..., 9 for reading and writing.

Note that you should never use these special file names to name your own files.

 

Use NUL to Sink Program Output

Wildcard Character In File Names

File Name and File Path

⇑⇑ Windows Batch File Tutorials

2017-12-05, 184👍, 0💬