Qbasicnews.com

Full Version: Using DOS commands in QBasic
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I want to run DOS commands in QBasic. Is this possible? If so explain how please. (I have tried the Shell command and it says file doesn't exisit and it does i have checked the command. I am using a windows 3.1 with QBaisc 4.5 if that helps)
Are you sure the file exists? Try using an absolute path.
If an absolute path is using the full address instead of \foldername\program.exe then i did use the absolute path
That's correct.

Try some other dos commands. Do they work?
By full path, we mean something like this:

Code:
C:\Progra~1\Trillian\trillian.exe
or
Code:
C:\qbasic\qb45\bb.exe
or
Code:
D:\hello\kitty\fecker.exe

Make sure your path looks like some of those...
I Have tryed this
cls
shell "c:\pinball\pinball.exe"
then it printed file not found or missing pin.bin it had the pin.bin file and the pinball.exe file was there
then I tryed
shell "dir c:\"
and it printed file or folder not found
and c: is my root drive any more help?
Code:
chdir "c:\pinball"
shell "pinball.exe"

I'm guessing the pinball program expects the current directory to be its own....
Quote:I Have tryed this
cls
shell "c:\pinball\pinball.exe"
then it printed file not found or missing pin.bin it had the pin.bin file and the pinball.exe file was there
then I tryed
shell "dir c:\"
and it printed file or folder not found
and c: is my root drive any more help?
GORDIE,
Plasm's suggestion to change directory to c:\pinball first should solve your problem.

However, I find it very hard to believe that the
shell "dir c:\"
command gave you an error. By the way, when you're running DOS, you will never get an error mentioning the word FOLDER. It will always say DIRECTORY. Something is not right here.
*****
I feel the need to spam you with this:

http://www.geocities.com/pisforpi/prog.gif

"There are lies, damn lies, and [made up]* statistics."
*not original quoter's words.
^^^ That be mark twain Smile
Pages: 1 2