VOGONS


First post, by dimb

User metadata
Rank Newbie
Rank
Newbie

have a problem:

we use very old set of tools. It's include many batch files with commands like "me.exe %12.rez" - in result we must open file with name [parameter]2.rez in me.exe.

in native dos %12 interprt. as "[first_parameter]2"
in dosbox --- as 12's parameter

Some solution?

Reply 1 of 4, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

try using a env variable

SET A=%1
mem %A2.rez

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

Reply 2 of 4, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

Shouldn't it be %1% anyways? Or does my memory fail me there?

Reply 3 of 4, by dh4rm4

User metadata
Rank Oldbie
Rank
Oldbie

Command-line parameters - these have the form %0, %1...%9, and initially contain the command name and the first nine command line parameters passed to the script (e.g., if the invoking command was "myscript.bat John Doe", then %0 is "myscript.bat", %1 is "John" and %2 is "Doe")

from : http://en.wikipedia.org/wiki/COMMAND.COM

Reply 4 of 4, by dimb

User metadata
Rank Newbie
Rank
Newbie

ок.
SET A=%1
mem %A%2.rez
works, snks!