; @echo off ; d:\plt\mzscheme -r %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 ; goto :end ... scheme-program ... ; :endWith this code, your batch file can use as many as nine parameters. In Windows NT and Windows 2000, you can instead write
; @echo off ; d:\plt\mzscheme -r %0 %* ; goto :end ... scheme-program ... ; :endThis code allows an arbitrary number of parameters to your batch file.
The batch file code works by combining both batch and MzScheme syntax in a single file. This is the same idea used in MzScheme UNIX shell scripts. When invoked from the command line, the semicolons are ignored. The second line invokes MzScheme with the batch file as an argument. MzScheme interprets the lines beginning with semicolons as comments, and runs the Scheme code. When the Scheme program is done, control returns to the batch file, and the goto jumps around the Scheme code.