vbscript - How do I let cmd know VB script has finished? -
i using solution here convert .csv .xlsx:
convert .csv .xlsx using command line
dim file, wb createobject("excel.application") on error resume next each file in wscript.arguments set wb = .workbooks.open(file) wb.saveas replace(wb.fullname, ".csv", ".xlsx"), 51 wb.close false next .quit end wscript.echo "done!" i have tried running .cmd , works, when run cmd, command finishes right away though vb script still processes. there way let cmd know vb has finished? i'm trying create batch file, great know when part finished before moving on next step. thanks!
you're running script itself:
c:\path\to\your.vbs doing runs script associated interpreter, in normal installation wscript.exe. basically, above same as
wscript.exe c:\path\to\your.vbs wscript.exe launches scripts asynchronously, meaning returns while script continues running in background. running scripts synchronously need use commandline interpreter cscript.exe instead. add parameter //nologo suppress copyright/version info message.
cscript.exe //nologo c:\path\to\your.vbs with execution of batch script continue after vbscript terminates. using call command not required.
you can change default interpreter wscript.exe cscript.exe running wscript.exe //h:cscript or cscript.exe //h:cscript administrator.
Comments
Post a Comment