[AccessD] OT:Batch File Syntax

Arthur Fuller fuller.artful at gmail.com
Wed Mar 19 05:14:07 CDT 2008


Three more cool things to explore:

Parameters to a batch file are known internally as %1, %2... %9, which
implies a maximum of 9 parameters. (%0 is the name of the batch file
itself). You can extend the number of parameters using the SHIFT command,
which pops %1 off the stack and shifts the rest down one, so that after a
SHIFT, %3 is now %2 and so on.

CALL arg runs arg.com, arg.exe or arg.cmd, whichever is found first. More
importantly, it returns to the batch file afterwards, allowing the batch to
continue.

START runs a program. You can pass arguments to the program. In the case of
associated extensions, you can even skip the program's name:

MyResume.doc

will run Word and load the specified file.

Arthur

On 3/18/08, Darren D <darren at activebilling.com.au> wrote:
>
> Hi Arthur
> The %%X stuff looks way cool
> The If Exist and goto syntax options have worked beautifully
> The Batch file is now much smarter - I have incorporated this newly
> learned
> logic to many areas of the file - a lot more powerful and intuitive now
> Many many thanks - I am grateful
>
> Time for an article on the %%X stuff me thinks
>
>
> Darren
>
>



More information about the AccessD mailing list