|
'Dim Inet1 As New InetCtlsObjects.Inet
Dim FTPHostname As String Dim Response As String Public Sub writefile(pathname As String, filename As String, _ IPaddress As String) 'note ..your ip addres specified should be that 'of an anonymous FTP Server. 'otherwise use ftp://ftp.microsoft.com kind of syntax FTPLogin FTPHostname = IPaddress Inet1.Execute FTPHostname, "PUT " & pathname & filename & _ " /" & filename Do While Inet1.StillExecuting DoEvents Loop Exit Sub End Sub Public Sub getfile(pathname As String, filename As String, _ IPaddress As String) 'note ..your ip addres specified should be that of 'an anonymous FTP Server. 'otherwise use ftp://ftp.microsoft.com kind of syntax FTPLogin FTPHostname = IPaddress Inet1.Execute FTPHostname, "GET " & filename & " " & _ pathname & filename Do While Inet1.StillExecuting DoEvents Loop Exit Sub End Sub Private Sub FTPLogin() With Inet1 .Password = "Pass" .UserName = "Anonymous" End With End Sub |