send file to FTP server

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
 
J

Joe Fallon

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top