0

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?

milanDD
  • 123
  • 1
  • 11
  • 2
    Possible duplicate of [Wait for Shell to finish, then format cells - synchronously execute a command](https://stackoverflow.com/questions/8902022/wait-for-shell-to-finish-then-format-cells-synchronously-execute-a-command) – iDevlop Feb 07 '18 at 09:46
  • The difference is that I am using winscp commands in my code – milanDD Feb 07 '18 at 10:14
  • 1
    then you should perhaps edit your question to explain in what way it makes a difference – iDevlop Feb 07 '18 at 10:20

0 Answers0