Advertisement
Java_Volume1 Internet/ HTML #90807

Make Your Own FTP Client

Make a simple FTP Client that allows you to read and write to a remote computer

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
' 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
Upload
Original Comments (3)
Recovered from Wayback Machine