1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

Android Question How To Check a File in FTP

Discussion in 'Android Questions' started by Sai Main Seng Kham, Jul 20, 2019.

  1. Sai Main Seng Kham

    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)

    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)
  2. Jorge M A

    Jorge M A Active Member Licensed User

    Why not? do you have any error? Post it here.

    Wait For FTP_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry'<----
    Be sure to set FTP.PassiveMode=True
    Erel and José J. Aguilar like this.
  3. Erel

    Erel Administrator Staff Member Licensed User

    (Files(0) will never be not initialized. The array can be empty, Length = 0)
    Jorge M A likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice