Dim strQuote As String
strQuote = Chr(34)
Dim strSFTPDir As String
strSFTPDir = "c:\program files (x86)\winscp\"
Dim strCommand As String
strCommand = "/script=c:\test\abc\WinSCPGet.txt"
Call Shell(strSFTPDir & "winscp.com " & strQuote & strCommand & strQuote, vbNormalNoFocus)
The WINSCPGet.txt file contains the following:
# Connect to the host and login using password
# Change the remote directory
# get all the files in the remote directory and download them to a specific local directory
get *.* c:\test\from\
# remove the files from the remote direcory
# Close and terminate the session
I don't have a host name for my SFTP site, just an IP address so I changed the first line to open sftp://user:password.xx.xx.xx.xx but this does not seem to work
Any ideas how to fix this please?