I am passing a multi-line string to a batch file from a vbscript. However, when I try to get the whole string from the batch file, it is only receiving the first line. How can I let the batch file know to read the whole string, and not stop at the newline character.
Input:
C:\ComponentA
C:\ComponentB
C:\ComponentC
VBScript:
multstring = "C:\Component_A" + Chr(13) + Chr(10) + "C:\ComponentB" +
Chr(13) + Chr(10) + "C:\ComponentC" + Chr(13) + Chr(10)
script_path = "runscript.bat """ + multstring + """
Shell(script_path)
Batch:
set "scriptargs=%~1"
echo "%scriptargs%"
setlocal enableDelayedExpansion
echo !scriptargs!
Output I am Getting:
C:\ComponentA
Output Wanted:
C:\ComponentA
C:\ComponentB
C:\ComponentC