VOGONS


First post, by 5150dole

User metadata
Rank Newbie
Rank
Newbie

Traditionally, DOS allowed you to use COPY to create simple files via:

C:\>COPY CON FILENAME.TXT This is a line that ends in return. This is another line ending in return. ^Z 1 file copied. C:\> […]
Show full quote

C:\>COPY CON FILENAME.TXT
This is a line that ends in return.
This is another line ending in return.
^Z
1 file copied.
C:\>

In stock DOSBox 0.74, COPY CON FILENAME.TXT does not echo the line as it's being typed, and it does not seem to allow users to type multiple lines. A file with the (invisibly typed) characters is created upon pressing return for the first time, and there's no need or opportunity to press ^Z.

(This may or may not be related to the fact that a VI.COM text editor seems to append ^Z [26, 1Ah] to each file it saves, but that may also be a separate issue or bug in that DOS port of vi.)

Anyway, is DOSBox's weird COPY CON behaviour a bug?

Reply 3 of 3, by 5150dole

User metadata
Rank Newbie
Rank
Newbie
Cobra42898 wrote on 2020-01-03, 20:08:
does the @echo on or @echo off command do anything? […]
Show full quote

does the
@echo on
or
@echo off
command do anything?

At the CLI prompt (as opposed to in a *.BAT file)?
Yes, in fact it does; it shows/hides the prompt.
I don't think it used to do that traditionally; I think @echo off only had an(y lasting) effect in a *.BAT file.

I don't however understand enough to see how this would be related to the issue with COPY CON. (I'm not saying it isn't; I just don't understand.)