On 6/15/2026 7:23 PM, Thomas Desi via Freedos-user wrote:
Why does the size of the command line matter when you're doing a redirect of
output?
It redirects the input to a file using standard redirection, it would be just
like reading a file from a com port, which used to be done all the time in the
early dos days, and files considerably larger than 127 bytes were certainly
transferable using that method, so redirecting the keyboard to a file (which is
what you're doing when using the copy con) should perform the same redirect,
and the size of the command line should have no bearing on the size of the file.
perhaps buffers and/or memory sizes may impact the size of the file, but I have
no idea why the command line would make any difference.
sounds intrigueing - sorry my ignorance, could you give a practical example for
the method you would actually input the text? I have no problem with the file
size (APPEND adds more and more to my foo.txt file).
when you say:
It redirects the input to a file using standard redirection, it would be just
like reading a file from a com port,
I guess that the „input“ still IS limited to chunks of max 127 characters,
right? I would need some kind of „buffer“ to fill until I would APPEND that
buffer to a file, i.e. writing it on disk.
Or am I missing another trick her?
I don't actually know how large a buffer you get when using redirects,
but considering I used to print files all the time with a simple copy
file.txt>prn
(which is basically the same thing you're doing here), the printer
didn't care how large the file was. I'm sure there's some buffering is
beeind done, and where or how large those buffers are I don't know, but,
I'm fairly confident they aren't reliant on command line length to
determine how much can be transferred, but even if they are, it wouldn't
matter, because your disk drive is fast enough that it will remove
characters from the resident buffer before it becomes a problem.
If you want a sample to test this, simply create a file via copy
con>>out.txt
then just type 1234567890
13 times or more, and when you press ctrl-Z to close the redirect, it
will create your file, and if it's more than 128 bites, then you know it
worked.
_______________________________________________
Freedos-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-user