for /F %%* in ('cscript.exe "C:\Documents and Settings\mroush\Desktop\New
Folder\GetName.vbs"') do set vars=%%*
echo Variables=%vars%
pause
"C:\Program Files\Network Associates\PGPNT\PGP.exe" -o "C:\Documents and
Settings\mroush\Desktop\New Folder\toefl.txt" "C:\Documents and
Settings\mroush\Desktop\New Folder\%vars%"
for /F %%* in ('cscript.exe "C:\Documents and Settings\mroush\Desktop\New
Folder\GetName.vbs"') do set vars=%%*
echo Variables=%vars%
pause
"C:\Program Files\Network Associates\PGPNT\PGP.exe" -o "C:\Documents and
Settings\mroush\Desktop\New Folder\toefl.txt" "C:\Documents and
Settings\mroush\Desktop\New Folder\%vars%"
I get the filename in the test.txt file which is what I want to pass back to
the batch file. The variable I want to pass back is located in the
CheckNames.vbs file.
I would like to ask how will I pass a parameter in vbscript using that for loop?
for /F %%* in ('cscript.exe "C:\dir_list.vbs"') do set vars=%%*
echo variables=%vars%
this works, but I have to pass some argument in the dir_list.vbs..
When I try to do something like this:
(I based on this example: [cscript test.vbs /a:"a value" "another value"])
for /F %%* in ('cscript.exe "C:\dir_list.vbs /a:"value1""') do set vars=%%*
echo variables=%vars%
it didn't work. Even tried to remove the double quotes in the value1.
It only output/echo "variables=Input" instead of "variables=value1"
Any idea how will I do it?
Last edited:
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.