Hi,
I am trying to upload file to sftp using this code:
Public Sub SftpPut()
Const cstrSftp As String = """C:\Putty\pscp.exe"""
Dim strCommand As String
Dim pUser As String
Dim pPass As String
Dim pHost As String
Dim pFile As String
Dim pRemotePath As String
pUser = "username"
pPass = "Password"
pHost = "host.com"
pFile = "C:\Users\Worker\Pictures\diamonds_jewelry\not on ftp\360\227\images\227_01.jpg"
pRemotePath = "/360/"
strCommand = cstrSftp & " -sftp -l " & pUser & " -pw " & pPass & _
" " & pFile & " " & pHost & ":" & pRemotePath
Debug.Print strCommand
Shell strCommand, 1 ' vbNormalFocus '
End Sub
I assume there is a connection but the file hasn’t arrived to the sftp. What would you recommend me to do?
I am trying to upload file to sftp using this code:
Public Sub SftpPut()
Const cstrSftp As String = """C:\Putty\pscp.exe"""
Dim strCommand As String
Dim pUser As String
Dim pPass As String
Dim pHost As String
Dim pFile As String
Dim pRemotePath As String
pUser = "username"
pPass = "Password"
pHost = "host.com"
pFile = "C:\Users\Worker\Pictures\diamonds_jewelry\not on ftp\360\227\images\227_01.jpg"
pRemotePath = "/360/"
strCommand = cstrSftp & " -sftp -l " & pUser & " -pw " & pPass & _
" " & pFile & " " & pHost & ":" & pRemotePath
Debug.Print strCommand
Shell strCommand, 1 ' vbNormalFocus '
End Sub
I assume there is a connection but the file hasn’t arrived to the sftp. What would you recommend me to do?