Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 May : Re: FtpFindFirstFile and date problem
| Subject: | Re: FtpFindFirstFile and date problem |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Thu, 25 May 2006 13:41:31 |
"dpap" <dpap@softwaypro.gr> wrote in message
news:44761379@newsgroups.borland.com...
> but with other FTP clients I can see the year information of
> these files (windows explorer, AceFTP)
They are likely just substituting in the current year that the OS provides.
The raw data you showed certainly doesn't always have the year available.
> I try to access DirectoryListing without access. I don't know how to do
this
Did you read the Indy documentation yet? For example:
uses
IdAllFTPListParsers;
procedure getDirectory(directory : string);
var
S: String;
I: Integer;
begin
IdFTP1ChangeDir(directory);
IdFTP1.List(nil, '*.*');
with IdFTP1.DirectoryListing do
begin
for I := 0 to Count-1 do
begin
with Items[I] do
begin
if ItemType = ditFile then
begin
S := directory + '/' + FileName + #9#9 +
IntToStr(Size) + #9#9 + FormatDateTime('dd-mm-yy hh:nn:ss', ModifiedDate);
Memo1.Lines.Add(S);
WriteLn(F, S);
Application.ProcessMessages;
end;
end;
end;
end;
end;
Gambit