Qbasicnews.com
Run command - Printable Version

+- Qbasicnews.com (http://qbasicnews.com/newforum)
+-- Forum: QBasic (http://qbasicnews.com/newforum/forum-4.html)
+--- Forum: QB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-11.html)
+--- Thread: Run command (/thread-10056.html)



Run command - Flightfanatic - 10-22-2007

What is the command in qbasic to run a file?


Re: Run command - wildcard - 10-22-2007

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.


Re: Run command - Mac - 10-22-2007


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