VOGONS


First post, by OaklandPaul

User metadata
Rank Newbie
Rank
Newbie

I have been unable to redirect output to a file in DOSBox (version 0.74), via:
dosomething.bat >testout.txt 2>&1
where the ">" sign in a regular DOS window redirects the output (stdout) of a command to a file, and the "2>&1" redirects stderr to the same place as stdout.

The Dosbox console window says "SHELL:Redirect output to testout.txt", but the output still goes to the main Dosbox window. File "testout.txt" is created, but its empty. I varied the Dosbox cycle speed, with no effect. I want to save the output from compiling, but it is scrolling off the window.

Thanks very much.

Reply 1 of 5, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

try without the 2>&1 part
although the compiler might be using something else than stdout to display stuff (directly int 29 for example)

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 5, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

I have previously observed that stdout.txt and stderr.txt don't seem to work quite right with the standard 0.74 Windows build of DOSBox.
Re: The "-printconf" switch

As is so often the case, you may have better luck with the SVN Daum version.

Reply 3 of 5, by OaklandPaul

User metadata
Rank Newbie
Rank
Newbie

I had already tried both with and without the "2>&1". May be a bug in 074 version. I'm familiar with this compiler, it sends to stdout/stderr.

I'm not familiar with the SVN Daum version of Doxbox, I have to go thru my IT dept and they take almost FOREVER to approve stuff.

Thanks for the replies.

Reply 4 of 5, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

To be clear: are you running DOSBox.exe with the -noconsole switch?

Reply 5 of 5, by OaklandPaul

User metadata
Rank Newbie
Rank
Newbie

It doesn't make any difference if I use the -noconsole switch or not, the output doesn't get redirected to a file. Without the -noconsole switch, the console window gives the message "SHELL:Redirect output to testout.txt", but that doesn't happen.