I have currently this code:
Call Shell("("C:\Folder\WinSCP\WinSCP.com /ini=nul /script=""C:\Folder\WinSCP\Remote2local.txt"" ", vbHide)
Application.Wait (Now + TimeValue("0:00:10"))
Rest of the code ...
The problem with this code is that if the computer is slow, it will start the rest of the code before finishing the shell process, which will create an error.
After some research I have come to the conclusion that the best idea is to use Wscript.shell instead, but I can't figure out how it should be used with a winscp command?
Call Shell("("C:\Folder\WinSCP\WinSCP.com /ini=nul /script=""C:\Folder\WinSCP\Remote2local.txt"" ", vbHide)
Application.Wait (Now + TimeValue("0:00:10"))
Rest of the code ...
The problem with this code is that if the computer is slow, it will start the rest of the code before finishing the shell process, which will create an error.
After some research I have come to the conclusion that the best idea is to use Wscript.shell instead, but I can't figure out how it should be used with a winscp command?