- Jun
- 794
- 7
How can I force the For command to treat the set of values as strings rather than files? Consider the following btm file:
for /t" " %X in (%@right[-%@len[%@field[0,%cmdline]],%cmdline]) (echo %X)
If I run this with an argument of *, it will print out a list of the files in the directory. I want it to just print *.
The purpose of this is that I want to make some changes to the command line (e.g., add some default parameters), then run a program using the modified command line.
for /t" " %X in (%@right[-%@len[%@field[0,%cmdline]],%cmdline]) (echo %X)
If I run this with an argument of *, it will print out a list of the files in the directory. I want it to just print *.
The purpose of this is that I want to make some changes to the command line (e.g., add some default parameters), then run a program using the modified command line.