1.

Solve : call .vbs in a .bat file??

Answer»

Hello,
I'm using Windows 2k, I was wondering if it's possible to call a .vbs script and use the output as the variable in a BATCH file?
ie.
rem now-1
call now.vbs
for /f tokens=1-3 delims=/. " %%m in ("%now%") do (

set mm=%%m
set DD=%%n
set yy=%%o

set now=%%m%%n%%o)

echo%now% >>.log

Thank you for your time.One way would be to pass the variable thru the environment. Have the VBScript set the environment variable (now for example) and then read it BACK in your batch file (%now% for example)

Use the cscript ENGINE to call your VBScript; all work would need to be done in the same session of the cmd shell.

You can also persist DATA from one script to another by using a file.

Hope this gives you some ideas. 8-)



Discussion

No Comment Found