charnitz
Experienced Member
batch.bat contains this:
Results:
How can the batch file reference an argument with spaces in it?
This pattern concatenates arguments, but runs out of argument variables after 8 spaces between 9 strings:
@echo %1
Results:
C>batch hello
hello
C>batch hello string
hello
C>batch "hello string"
"hello
hello
C>batch hello string
hello
C>batch "hello string"
"hello
How can the batch file reference an argument with spaces in it?
This pattern concatenates arguments, but runs out of argument variables after 8 spaces between 9 strings:
set msg=%1 %2
echo %msg%
echo %msg%