[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: Strange XY3 behaviour
- Subject: Re: Strange XY3 behaviour
- From: Stephen Moore essmo@xxxxxxxx
- Date: Tue, 8 Dec 1998 21:59:44 -0500 (EST)
On Wed, 9 Dec 1998, Yo Intl. wrote:
> Did I, after all these years, stumble upon a XY3 bug? I wanted to
> save a file to floppy and typed "sa b:con". XY first told me
> there was a file of that name (there was not), and when I told it
> to overwrite, it completely freaked out. I rebooted and tried again --
> same thing. What is this? Does the "con" interfere with the "con" DOS
> command? Or was this just a fluke?
CON is one of DOS's reserved words for logical devices, in this case
the console device. Others are PRN, LPTx, COMx, and the ever-
popular NUL. In its operations DOS sees these as logical files,
so in your command above there was indeed a file. CON (without
a dot and extension) was taken to be the console, i.e., the
keyboard/screen.
Some examples of using the CON device:
* Instead of using TYPE (in DOS, not Xy) try
COPY filename CON to display an ASCII file
onscreen. Works the same as TYPE except that
you can't pipe it through MORE to paginate.
* Enter the command COPY CON filename to create
a small file quickly. Type some lines, ending
each with a , and finally a Ctrl-Z to serve
as the EOF marker. DOS will say, "1 file(s) copied."
* Type COPY CON PRN to send text directly to the
printer, Works like the preceding example except
that it'll come out of your printer instead of
going into a disk file (though you'll probably
have to press the form feed button).
* The logical device NUL exists in all directories
and subdirectories -- so if there's no such sub-
directory, there's no NUL. This is useful for
IF EXIST conditionals in batch files.
Oh, well. Enough arcana for one post . . .
Stephen
-----------------------------------------------------------------
-----------
essmo@xxxxxxxx <*> Never bite when a simple growl will
do.
-----------------------------------------------------------------
-----------