SHELL

From QB64 Wiki
Revision as of 06:57, 3 September 2009 by imported>Clippy
Jump to navigation Jump to search

The SHELL statement allows a program to use DOS commands.


Syntax: SHELL DosCommand$


  • DOS commands can be a mixture of string and string variables added together(not case sensitive).
  • Allows access to DOS services such as DIR, VER, etc.
  • Commands can also run Windows programs such as Notepad to read text files.
  • NOTE: Unless QB is in a screen 0 window mode, your program will be minimized when a program opens.


Example: Shells to open Notepad minimized to print a file in Notepad.


SHELL "CMD C/ START /Min Notepad /p " + FileName$ ' NT version


SHELL "START /min Notepad /p " + FileName$ ' Win 9x version


Note: Using a Windows program allows a file to be printed on a USB printer.


See also: FILES, CHDIR, MKDIR, NAME, KILL


Navigation:

Go to Keyword Reference - Alphabetical

Go to Keyword Reference - By usage