VOGONS


executing batch files

Topic actions

First post, by fordprefect86

User metadata
Rank Newbie
Rank
Newbie

Hi folks,

I want to write a batch file that executes automatically in the dosbox. So I created a shortcut to dosbox and added the batch file as parameter.

The problem is, dosbox wants to mount the folder where the batch file is located as C. But, C is already mapped to my real C partition (later, I want to do this with the batch file rather than in dosbox.conf, but the problem would be the same). I need C to be mapped to my C partition, because the program I execute with the batch file uses absolute paths and only works with this configuration.

Because C is already mounted, dosbox doesn't find the batch file (it isn't located in C:\... and no, I don't want to move it there).

So my question is: Is there a way I can execute a batch directly with dosbox without needing C to be mapped to the folder where my batch is located?

Reply 1 of 5, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

use the -c command when specifying parameters

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

Reply 2 of 5, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

You need to use 2 of the -c options: One to mount a drive with your batch file, and one to execute it:

dosbox -c "mount X \path\to\folder\with\bat-file" -c "X:name.bat"

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 4 of 5, by fordprefect86

User metadata
Rank Newbie
Rank
Newbie

@collector: I don't want to lose the possibility to launch more than one application with the same dosbox installation, so I execute all the app specific commands in a batch.

@others: thanks, works fine with -c parameter.