VOGONS

Common searches


First post, by Menoetius

User metadata
Rank Newbie
Rank
Newbie

So I've encountered a problem I can't seem to find a solution to anywhere:
I want to create a .bat file that launches dosbox with arguments what have multiple space characters in them.

In run.bat, I've done the following:
SET path="C:\Program Files (x86)\Steam\steamapps\common\Doom 2\base"

dosbox -c mount "g %path%"

Which results in DOSBox only parsing mount g and not the directory

The following only results mount being parsed:
dosbox -c mount g C:\Program Files...
dosbox -c mount g "C:\Program Files (x86)\"
dosbox -c mount "g C:\Program Files (x86)\"

dosbox -c "mount g C:\Program Files (x86)\" results in Directory C:\Program doesn't exist.

dosbox "-c mount g C:\Program Files (x86)\"results in DOSBox intuitively not recognizing any of it

dosbox -c mount g "%path%" somehow doesn't even launch DOSBox

Does anyone have any solutions for this? Its driving me nuts.

Last edited by Menoetius on 2020-03-28, 11:32. Edited 1 time in total.

Reply 1 of 2, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

from the readme:

Note:

If a name/command/configfilelocation/languagefilelocation contains a space, put the whole name/command/configfilelocation/languagefilelocation between quotes ("command or file name"). If you need to use quotes within quotes (most likely with -c and mount):
Windows and OS/2 users can use single quotes inside the double quotes.
Other people should be able to use escaped double quotes inside the double quotes.
Windows: -c "mount c 'c:\My folder with DOS games\'"

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