0

On Win 7 Enterprise 64bit V6.1.7601 SP1 Build 7601, I cannot create *.csv files with specific names, i.e. CON.csv or PRN.csv.

This is the error I get when I try to rename:

enter image description here

Also, if I try to rename it from cmd.exe:

enter image description here

I also tried lowercase, still problems. Why do I get those errors?

3

3 Answers 3

6

Those are reserved file names from the DOS days. There are a few more.

Below is a list of default device names.

   Name    Function
   ----    --------
   CON     Keyboard and display
   PRN     System list device, usually a parallel port
   AUX     Auxiliary device, usually a serial port
   CLOCK$  System real-time clock
   NUL     Bit-bucket device
   A:-Z:   Drive letters
   COM1    First serial communications port
   LPT1    First parallel printer port
   LPT2    Second parallel printer port
   LPT3    Third parallel printer port
   COM2    Second serial communications port
   COM3    Third serial communications port
   COM4    Fourth serial communications port

For more information, read this article: What's the deal with those reserved filenames like NUL and CON?

2
  • +1, I thought PRN meant something else(expected of a teenage bill making an OS), good to know it's parellel.
    – behrooz
    Dec 13, 2013 at 21:37
  • I like the link, and I think you should give it a bit more visibility by renaming it to the post full name.
    – Oleg
    Dec 13, 2013 at 21:40
2

For historical reasons, names such as CON and PRN are forbidden as filenames in Windows. These names once belonged to MS-DOS special devices:

The reserved names themselves were chosen to be compatible with "special files" handling of PIP command in CP/M. There were two kinds of devices in MS-DOS: Block Devices (used for disk drives) and Character Devices (generally all other devices, including COM and PRN devices). PIPE, MAILSLOT, and MUP are other standard Windows devices.

For more information, including a list of names reserved in this fashion, see the Wikipedia article on device files.

1

Those are reserved names - see http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx

Not the answer you're looking for? Browse other questions tagged .