Jeśli chcesz odczytać datę utworzenia pliku zaraz po tym jak go tam wysłałeś, to możesz
skorzystać z daty ostatniej modyfikacji, która będzie taka sama jak data utworzenia pliku.
// FTP = IdFTP; sLastMod = String; FileName = String, plik;
FTP.SendCmd('MDTM ' + FileName, [213]);
sLastMod := FTP.LastCmdResult.Text.Text;
MDTM
Syntax: MDTM
remote-filename
Returns the last-modified time of the given file on the remote host in the format "YYYYMMDDhhmmss
":
-
YYYY
is the four-digit year,
-
MM
is the month from 01 to 12,
-
DD
is the day of the month from 01 to 31,
-
hh
is the hour from 00 to 23,
-
mm
is the minute from 00 to 59,
- and
ss
is the second from 00 to 59.
Z takiego string'a wydobywasz odpowiednio kolejne elementy (Y
, M
, D
, h
, m
, s
) i przy
pomocy EncodeDateTime
() przekształcasz je na typ DateTime
.