Qbasicnews.com
July 20, 2019, 11:30:32 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Run command  (Read 2286 times)
Flightfanatic
New Member

Posts: 1



« on: October 22, 2007, 09:48:05 AM »

What is the command in qbasic to run a file?
Logged
wildcard
*.*
Administrator
__/--\__
*****
Posts: 2369



« Reply #1 on: October 22, 2007, 09:58:16 AM »

If you want to run another .BAS file you can use the RUN statement - http://qbasicnews.com/qboho/qckrun.shtml or CHAIN statement - http://qbasicnews.com/qboho/qckchain.shtml
If you want to run another file using the Operating System (.EXE/.BATs/etc) you can use the SHELL statement - http://qbasicnews.com/qboho/qckshell.shtml

It all depends on what you want to do and how.
Logged
Mac
Senior Member
**
Posts: 243


WWW
« Reply #2 on: October 22, 2007, 03:23:18 PM »


Good answer!

The only thing I would add is it sometimes necessary to add CMD /c

SHELL "cmd /c xxxxxxx"

where xxxxxx is the command that you are running via SHELL and it is not running correctly because QBasic invokes the COMMAND.EXE rather than the CMD.EXE that you are probably used to.

Mac
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!