Wrote a program to take arguments but really all I did was write a wrapper
around the program that I am passing aruguments to. So it can be 1 to 6
arguments and I just pass whats typed at command line. I can not assign each
argument.
I know with the script code below I can get count and print each argument to
console. What I need to be able to do is capture each argument and adding a
space between each one and store into varible.
For example,
MyVbscript.vbs c:\tmp 4 test.log 'In this scenerio three parameters are
passed which I will just pass to the program I am executing inside vbscript.
The code below would print out
c:\temp
4
test.log
I need the following
c:\temp 4 test.log ' need this string stored in a varibale.
Set objArgs = WScript.Arguments
WScript.Echo "Total number of arguments: " & WScript.Arguments.Count
for each sArgs in objArgs
sArgs = sArgs
WScript.Echo sArgs
Next