Discuss this help topic in SecureBlackbox Forum
Retrieve the file list
To retrieve the list of files, use MLSD(), GetFileList() or GetNameList() methods of TElSimpleFTPSClient class. All of these methods return the data via OnTextDataLine event. So you need to provide a handler for this event in order to obtain the data.
If the server supports MLSD command (this can be checked using ExtMLSTSupported property of TElSimpleFTPSClient class), you can use the reliable way to read the directory contents. Call MLSD() method to retrieve the directory listing in standard-defined machine-parseable format. You can parse the entries of such listing using ParseMLSDEntry() class method of TElSimpleFTPSClient class.
GetFileList() method returns the listing as returned by the file system (or the FTP server). Such listing can contain file name, access rights, size, various dates etc.. You can parse the entries of the listing using ParseFileListEntry() class method of TElSimpleFTPSClient class. The listing is system-dependent. Nowadays about 400 formats are known. TElSimpleFTPSClient class supports most commonly used Unix format only. You can parse other formats yourself.
GetNameList() method returns only file and directory names. This can be more handy than using GetFileList() and then parsing the result.