Mark Pearl

Using parameters in Bat files

Parameters passed through the command line can be accessed in batch files with the notation %1 to %9. There are also two other tokens that you can use:

%0 is the executable (batch file) name as specified in the command line. %* is all parameters specified in the command line – this is very useful if you want to forward the parameters to another program.


Using parameters in bat files

blog comments powered by Disqus

Want to get my personal insights on what I learn as I learn it? Subscribe now!