Android Question How To Check a File in FTP

Sai Main Seng Kham

Member
Licensed User
How to check a File is exist or not in FTP.
I have try FTP.List , and it not Ok

*i want to check "active.txt" file on my FTP.

If active.txt is missing on my FTP , log(Active not Found)

If active.txt is found on my FTP ,
log(Active Success)

Please
I have tried myself.
I swear , i didn't ever post Thread before i have tried myself and i have search in search engine (Forum)
 

Jorge M A

Active Member
Licensed User
FTP.List , and it not Ok
Why not? do you have any error? Post it here.

B4X:
FTP.List("/active.txt")
    Wait For FTP_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry) '<----
    Log(Files.Length)
    Log(Files(0).IsInitialized)
    Log(Files(0).Name)
    Log(Files(0).Size)
    Log(Files(0).Timestamp)
Be sure to set FTP.PassiveMode=True
 
Top