I wrote a WinSCP script that upload a local file to a SFTP site. The script is saved into .txt:
WinSCP.com
open sftp://username:password@address
cd /export/home/Desktop/Temp
put C:\Users\Dekstop\JPMC\a.xlsx
close
exit
Then I look at this post and write this code into Excel VBA:
Sub RunWinScp()
Call Shell("C:\Program Files (x86)\WinSCP\WinSCP.com /ini=nul/script=C:\Users\Desktop\WinSCPGetNew.txt")
End Sub
But when I try to run it, nothing happens. There is no error, but the file is not transferred correctly neither. Could someone please help?
Thanks a lot!