- Jun
- 760
- 16
Shouldn't the alias shown below work?
It's not only the parameter %# that doesn't work with DO.
DO does accept parameters when run directly from the command line rather than an alias.
It also works from a batch file.
Am I misunderstanding something that explains why it does not work in an alias?
echo Parameter count = %# & do %# (echo test)alias zz & zz one two three
Parameter count = 3
Usage : DO [n | FOREVER]
It's not only the parameter %# that doesn't work with DO.
set count=%# & echo Parameter count = %count & do %count (echo test)alias zz & zz one two three
Parameter count = 3
Usage : DO [n | FOREVER]
DO does accept parameters when run directly from the command line rather than an alias.
It also works from a batch file.
echo Parameter count = %#type test.btm & test.btm one two three
do %# (echo test)
Parameter count = 3
test
test
test
Am I misunderstanding something that explains why it does not work in an alias?