Android Question how to get list of file on server to be downloaded by ftp connection with net library

Leni Berry

Active Member
Licensed User
Longtime User
if we use net library for ftp. can we get list of file from ftp server? is there any example about that?
 

Johan Schoeman

Expert
Licensed User
Longtime User
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
B4X:
Sub FTPFileList
    FTP.Initialize("FTP", "Dell-R230", 21, "FTPUser", "B4XFTP123.") 'FTP login details - Server

    Dim SF As Object = FTP.List("/")
    Wait For (SF) FTP_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
    If Success Then
        For Each FTPFile As FTPEntry In Files
            Log(FTPFile.Name)
        Next
    End If

    FTP.Close
End Sub
 
Upvote 1
Top