Click here to LOGIN
Information
Tutorials & Articles
Programs
Feedback
 


Forum
Add a Post
Username:   (You must log on to use your member username)Hint: Use [code] and [/code] around text to highlight it as QB code.


Subject:
Message:
Forums -> Q & A -> batch
Qbasicfreak
batch
Posted Oct 19 2009
How do you start a batch file from qbasic?
And then return control back to qbasic. I've tried everything I can think of!

cheers
ingalls
Clippy
Use the Start command
Posted Oct 19 2009
Why use a batch file when you can use SHELL to do things in DOS?

Use the Start command to allow the QB program to continue. In SCREEN 0 windowed mode other Windows programs should run fine, but in fullscreen mode, you need to change SCREEN modes after the SHELL. The screen will look like a nightmare. QB programs will be minimized to the taskbar.

In Win9X use: START [/options]program [/progoptions] [filename]
In XP or NT : CMD /C START [/options] program [/progoptions] [filename]

[] brackets indicate optional arguments

Also never use CALL in a batch file as it will wait for a program to close before completing.
Qbasicfreak
thanks
Posted Oct 20 2009
thanks for the help. I figured out why I couldn'e get it to work in qbasic. The exe I was trying to access was longer than 8 characters. Does qb64 allow accessing files longer than 8 characters? We really need a qb64 file section for this site!
Clippy
Yes, because you can use long filenames in QB64
Posted Oct 20 2009
As for QB, there are ways to access long filenames using an Interrupt routine or ASM. Look for an "LFN" bas file on the web.

The QBasic Station, (C) Copyright 1997-2010