AUX File Writing Error

John Machin sjmachin at lexicon.net
Thu Feb 15 09:34:53 EST 2007


On Feb 16, 12:13 am, "Gabriel Genellina" <gagsl... at yahoo.com.ar>
wrote:
> En Thu, 15 Feb 2007 03:34:59 -0300, John Machin <sjmac... at lexicon.net>
> escribió:
>
> > On Feb 15, 4:03 pm, thewritersc... at gmail.com wrote:
> >> Is there any way I can create an "AUX.csv" file without the error?
>
> > Probably not. AUX, CON, NUL, PRN, LPT, COM1, COM2 etc (with or without
> > an extension) are reserved in Windows for specific devices for
> > compatibility with MS-DOS 1.00 programs, which did that for
> > compatibility with CP/M.
>
> (This is OT now) Do you know why "AUX.csv" is invalid too? I can accept
> that AUX (without extension) is an invalid filename, but it is quite
> different from "AUX.csv"
>

It is actually a valid file name, but the file is not on disk. I
presume that the OP got an error because it was in 'a' (append) mode
which requires an existing disk file. See below.

C:\junk>copy con aux.csv
fubar
^Z
        1 file(s) copied.

C:\junk>copy con sux.csv
fubar
^Z
        1 file(s) copied.

C:\junk>dir *ux.csv
[snip]
 Directory of C:\junk

16/02/2007  01:19 AM                 7 sux.csv
               1 File(s)              7 bytes

Why? Who knows? We're talking CP/M, MS-DOS and Windows and you want to
know why? Probably too lazy to distinguish between 'AUX\0', 'AUX.\0'
and 'AUX.XYZ\0' ... probably stopped scanning on reaching the first
invalid character. If you're desperate to find out, dial up your
nearest RCPM and ask the sysop :-)

Cheers,
John




More information about the Python-list mailing list