0

Using QBASIC: Performing SHELL action: SHELL TMP$ (where TMP$ = C:\test1.exe) but need to pass 1 parameter (a File name) to the test1.exe...jnh999

Jack H
  • 21
  • 1
  • 1
    You may want ot have a look at the [SHELL command page of the QB64 wiki](http://www.qb64.net/wiki/index.php/SHELL) including examples. – halfbit Nov 12 '17 at 10:43
  • The `SHELL` statement accepts a single string as its argument, so just use string concatenation to add a space and the desired parameter. –  Nov 12 '17 at 23:02

1 Answers1

0

Sample code to use SHELL in BASIC:

REM sample to call shell
PRINT "Enter command";: INPUT Cmd$ ' could be C:\test1.exe
PRINT "Enter parameter";: INPUT Param$ ' could be your filename
ShellStatement$ = Cmd$ + " " + Param$
SHELL ShellStatement$
END
eoredson
  • 1,167
  • 2
  • 14
  • 29