Board index » delphi » FTP and file datetime (TidFTP from Indy)

FTP and file datetime (TidFTP from Indy)

Hi,

I am having a hard time parsing a list of files that comes as a response
from an FTP server in order to get a Date and Time of each file. My problem
is that this list doesn't have a consistent format for file date and time.
For some files a get "Dec 18 2000" and for some "Dec 18 15:52"?!? It doesn't
seem possible to get a full date and time of each file from FTP server.

Is there a way to get a file list with a full date and time information from
FTP server? Something like: "ls -l --full-time" (linux) command.

In general, what is the best way to get file date and time from server?

Any suggestion would be greatly appreciated.

Thank you in advance,

Milisav

 

Re:FTP and file datetime (TidFTP from Indy)


If you are using UNIX FTP server then you can try this one:

IdFTP.List(result, '-l --full-time', false);

Doychin
doic...@5group.com

Quote
"Milisav Radulovic" <mili...@ICGDomain.com> wrote in message

news:3a538969_2@dnews...
Quote
> Hi,

> I am having a hard time parsing a list of files that comes as a response
> from an FTP server in order to get a Date and Time of each file. My
problem
> is that this list doesn't have a consistent format for file date and time.
> For some files a get "Dec 18 2000" and for some "Dec 18 15:52"?!? It
doesn't
> seem possible to get a full date and time of each file from FTP server.

> Is there a way to get a file list with a full date and time information
from
> FTP server? Something like: "ls -l --full-time" (linux) command.

> In general, what is the best way to get file date and time from server?

> Any suggestion would be greatly appreciated.

> Thank you in advance,

> Milisav

Other Threads