On Sun, Nov 28, 2021 at 6:53 AM saito yutaka <melody....@gmail.com> wrote:
>
> Hello.
>
> How to redirect STDOUT and STDERR to file.
> I want to redirect to file as follow.
>
[..]

Normally I'd recommend the INVOKE program from the "Dostools" collection:
http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/util/user/dosutils/

In that case, INVOKE /R will redirect stderr to stdout. Calling MOVE
with an invalid filename will generate an error message to stderr, but
you can redirect that to stdout like this:

INVOKE /R move aaa a > OUT.TXT

And nothing gets printed to the user, but OUT.TXT now has the error
message from MOVE.

However, DIR is an internal command, so INVOKE will not work there.


_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to