SHELL

From QB64 Wiki
Revision as of 08:36, 30 August 2009 by imported>Clippy (Created page with '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.…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.
  • 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 Notepad opens.


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


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


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


See also: FILES, CHDIR, MKDIR, NAME