VOGONS


First post, by Luzie

User metadata
Rank Newbie
Rank
Newbie

Hi,

I looked around here, but I can´t find a solution for my problem:

How can I pass Commandline-Parameters to a Batchfile i start with [autoexec] in the dosbox.conf ?
E.g. I have in the dosbox-conf Autoxec-Section:

DIR %1
PAUSE
EXIT

Then, when I start DosBox.exe via the command-line:
DosBox.exe c:\*.*
I don´t get an "DIR C:\*.*" as I need.

Is there a way to pass anything from commandline of DosBox.EXE to
a Batchfile I start within the DOSBox-Autoexec-Section ?

Regards,

Luzie

Reply 1 of 3, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

readme -> MOUNT

Reply 2 of 3, by MiniMax

User metadata
Rank Moderator
Rank
Moderator
Luzie wrote:

Is there a way to pass anything from commandline of DosBox.EXE to
a Batchfile I start within the DOSBox-Autoexec-Section ?

No. But you can pass the complete command to DOSBox using -c "file.bat arg".

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 3 of 3, by Luzie

User metadata
Rank Newbie
Rank
Newbie

Dear MiniMax,

thanks lots, this works.

E.g. an TEST.BAT containing

dosbox.exe -c "MyBatch.BAT %1 %2 %3 %4"

will pass its parameters 1 and 2 when startet with
TEST.BAT parameter1 parameter2
into DOSBox.

Regards,
Luzie