VOGONS


QB45 open command

Topic actions

First post, by snowks

User metadata
Rank Newbie
Rank
Newbie

I am trying to use DOSBOX to run a QB45 program. I am getting an error with the OPEN command.
I am using the OPEN command to write output to a data file. The line in the program is:
OPEN "c:\location\" + filename$ for output as #2

Any suggestions?

Reply 1 of 4, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

I think we need your mounting commands and your file structure.
Or maybe tell us wether location is there in dosbox after you mount your stuff.
So please, do a dir command in c after your mountings.
mount c ...
C:
dir

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 2 of 4, by snowks

User metadata
Rank Newbie
Rank
Newbie

Here are the steps. Hard drive is C: The program is located in C:\DOSPROG\
1. Mount c c:\dosprog
2. C:
3. Dir (program can be seen)
4. Type program name
5. Program runs but errors when trying to open (OPEN C:\DOSPROG\" + FILENAME$ FOR OUTPUT AS #2)

Reply 3 of 4, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

See your point 1 and 5...
The program wants to run something in c:/dosprog but since you mounted that as c that folder is now the root of c and therefore doesn't exist for dosbox (in a crazy nutshell 😉).
So either reinstall the program from within dosbox or make a new folder called dos in your real C:
Then move the folder dosprog into that folder, then in dosbox run
mount c c:/dos
C:
cd dosprog
Programname

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 4 of 4, by snowks

User metadata
Rank Newbie
Rank
Newbie

Success! Thanks for the help. I re-coded the program to open the file in the root (C:) directory.