VOGONS


First post, by pmennen

User metadata
Rank Newbie
Rank
Newbie

I'm calling dosbox from a button of another windows program. I don't want the extra console dos box to appear so I'm using the "noconsole" command line option. As the manual suggests, two files are created to contain the standard and error outputs:

-noconsole (Windows Only)
Start DOSBox without showing DOSBox Status Window (console).
Output will be redirected to stdout.txt and stderr.txt

However in my situation, I rarely if ever want to see these files. Since I have a cd command in the command line as well, these files appear in the folder that I am cd'ing to and my disk eventually gets littered with many of these zero length stdout.txt and stderr.txt files.

Is there anyway to tell dosbox not to create these files, or to delete them when dosbox exits if the file is empty? Or another solution would be if there was a way to redirect them to some harmless place (perhaps my ramdisk?).

Any suggests will be most appreciated. Thanks.
~Paul

Reply 1 of 3, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

you'd have to take care of them yourself in the code that calls dosbox.

At least if you don't want modify the sourcecode of dosbox

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

Reply 2 of 3, by baldursgate

User metadata
Rank Newbie
Rank
Newbie

I call DOSBox from a batch file, and in it I cd to %tmp% before running it. The std*.txt files end up there.

Use start "" dosbox.exe to make the cmd box go away rather than wait for DOSBox to finish:

set currdir=%cd%
cd %tmp%
start "" "%ProgramFiles(x86)%\DOSBox-0.74\DOSBox.exe" -noconsole -conf %dosbox%\dosbox-0.74.conf
cd %currdir%

(With %dosbox% set to the path of where all my games are.)