send file to FTP server

  • Thread starter Thread starter blais
  • Start date Start date
B

blais

Hi
I would like to send files to a FTP server. I'm using
Internet Transfer control for this but getting one error
message "Method Execute of object IInet failed". Am I
using the right syntax ?

Thanks in advance

here is the code I'm using to send files:

objFtp.Protocol = icFTP
objFtp.URL = "ftp://server.com"
objFtp.UserName = "AAA"
objFtp.Password = "ZZZZZ"

strAaRpt = "C:\FtpTest\"
strFileName = "abc.txt"

'Change to virtual directory
objFtp.Execute , "CD AlphaTest"

'Send file
objFtp.Execute , "PUT " & strAaRpt & strFileName & " "
& strFileName
 
I only tested it once (a long time ago) and came up with this:
(which worked)

With Inet1
.URL = txtURLbox
.UserName = txtUID
.Password = txtPWD
.Execute , "PUT " & txtLocalPath & " " & txtServerPath
End With
 
Back
Top