TIdFTP
has a DirectoryListing
collection that you can loop through after calling TIdFTP.List()
. Each item in the collection has FileName
, ItemType
, and ModifiedDate
properties, amongst many others.
There are many FTP listing formats used online, and Indy implements many parsers for them, however most of the parsers are not enabled by default. If the FTP server(s) you are connecting to do not support the MLSD
command (that parser is always enabled), and/or you are setting the TIdFTP.UseMLIS
property to false, then you will need to either:
add individual
IdFTPListParse...
units to youruses
clause to enable just the parsers for the particular formats that you want to support.add the
IdAllFTPListParsers
unit to youruses
clause to enable all of the parsers.