waitonreturn doesn't work

Advertisement

nedu_83@yahoo.com
Joined:
Posts:
1
Location:
malaysia

waitonreturn doesn't work

Hi, I'm trying to download files from remote server and process it. But the coding execute the next step before the /command completed.

my coding;
fetch.Run "C:\Windows\System32\cmd.exe /c start C:\""Program Files (x86)""\WinSCP\WinSCP.com /ini=nul /command " + _
"""open ftp://xxx:xxx@xxxx"" " + _
"""cd \xx\xxx\xxxx\1"" ""get logsc:\tmp\file1"" " + _
"""cd \xx\xxx\xxxx\2"" ""get logsc:\tmp\file2"" " + _
"""cd \xx\xxx\xxxx\3"" ""get logsc:\tmp\file3"" " + _
"""close"" ""exit"" ", windowStyle, waitOnReturn

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
37,591
Location:
Prague, Czechia

Re: waitonreturn doesn't work

The very purpose of the Windows start command is to run something in a separate window without blocking the original process. Remove it. I do not know, what language/environment your code is in (some kind of VB?), but removing whole C:\Windows\System32\cmd.exe /c start should do.
This is not WinSCP question.

Reply with quote

Advertisement

You can post new topics in this forum