Computer Hope
Microsoft => Microsoft DOS => Topic started by: John_L. on July 10, 2021, 09:14:22 AM
-
I consulted the "cmd /?" help, and it is clear as mud.
I am passing an argument to a command line program, that may contain spaces.
I thought this would work;
pgm.exe "one one-and-one"
but the PGM is complaining of a " character, that I thought the command line processor would be kind enough to remove.
Thanks in advance for the correct DOS incantation.
-
You can use the set keyword to format the multiword parameter into a single word variable:
set var=one one-and-one
pgm.exe %var%
8)