VOGONS


commandline params

Topic actions

First post, by work9work

User metadata
Rank Newbie
Rank
Newbie

Flags work fine but I can't seem to get other parameters to work.

Run dosbox
>mount c c:\
>c:\program.exe -f textfile.txt
doesn't work says can't load textfile.txt
>C:\program.exe -f "textfile.txt"
doesn't work
>c:\program.exe c:\textfile.txt
doesnt work
>c:\program.exe textfile.txt
doesn't work
I've also tried using a bat file doesnt work
program.exe and textfile.txt are both in c:\

What am I missing to pass a file name as a command line parameter to a program?

Reply 1 of 3, by Lofty

User metadata
Rank Member
Rank
Member

Maybe the program is looking in the current directory, rather than its own?
Does this work?...
mount c c:\
c:
program -f textfile.txt

Though, program.exe -f c:\textfile.txt should have worked regardless...

Reply 2 of 3, by work9work

User metadata
Rank Newbie
Rank
Newbie

It has to do with the length of the file name. Names longer than ~8 characters don't work (either in dosbox or this specific program).

Reply 3 of 3, by Lofty

User metadata
Rank Member
Rank
Member

Yes. 8 characters is an original DOS limit, and dosbox honours it for compatibility reasons. If you look at a directory listing in dosbox with "dir", you'll see the truncated names and you can use those, or just rename the files to 8 chars or less. 😀