VBScript - Wait until Download finished
Hi!
I'm using WinSCP in a VBScript and it's doing, what I want it to do.
The only problem i have is, that the Script is starting the next step, before the download is finished. As I don't know, how long the download will last, I don't want to use WScript.Sleep. Is there another chance to pause the script until WinSCP has finished?
Actual VBS code:
The WinSCP-Skript:
I tried using but then I get an error:
Any help appreciated!
Thank you very much
Stefan
I'm using WinSCP in a VBScript and it's doing, what I want it to do.
The only problem i have is, that the Script is starting the next step, before the download is finished. As I don't know, how long the download will last, I don't want to use WScript.Sleep. Is there another chance to pause the script until WinSCP has finished?
Actual VBS code:
cmdFTP = "winscp.com /script=ftp_vwgh.txt /log=" & strFTPLog
set objShell = wscript.createObject("wscript.shell")
Set objWshScriptExec = objShell.Exec(cmdFTP)
Set objWshScriptExec = nothing
The WinSCP-Skript:
option batch on
option confirm off
open ftp://server:21
lcd C:\Temp\risup\VWGH_Down
get *
rm *
close
exit
I tried using
Set objWshScriptOutput = objWshScriptExec.StdOut.ReadAll()
Microsoft VBScript runtime error: Object required: '[string: "batch on "]'
Any help appreciated!
Thank you very much
Stefan