Hi Angus,
Did you mean  the synchronization?
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
procedure TfrmMain.SynchronizeDirectory(FromPath, ToPath: string);
var
 sr : tsearchrec ;
 r :  integer ;
begin
 application.processmessages;
 r := findfirst(FromPath + '\*.*', faanyfile, sr);
while r = 0 do
begin
   if (sr.name <> '.') and (sr.name <> '..') then
   begin
     if (sr.attr <> 0) and (fadirectory <> 0) then
    begin
    SynchronizeDirectory(FromPath + '\'+sr.name , ToPath + '\' + sr.name)
    end;
     if not directoryexists(topath) then
     begin
     forcedirectories(topath);
     end;
    {Version control}
if fileage(FromPath + '\' + sr.name) <> fileage(ToPath + '\' + sr.name)then
     begin
CopyFile(pchar(FromPath + '\' + sr.name),pchar(ToPath + '\' + sr.name),FALSE);


     end;
    end;
     r := findnext(Sr)
 end;
   findclose(sr);
end;
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
----- Original Message ----- From: "Angus Robertson - Magenta Systems Ltd" <an...@magsys.co.uk>
To: <twsocket@elists.org>
Sent: Monday, October 12, 2009 12:24 PM
Subject: Re: [twsocket] ICS FTP: How to check if file is newer?


I have never done anything like this and I have no idea about how
to do it.
I have been looking for some examples but I can't find any made
with ics FTP
Any examples?
about how to compare this 2 files and get the new one.

The TMagFtp component uses ICS and will allow you to do all this with
about a dozen lines of code.  There is a compiled demo so you can test
the download without writing any code.

http://www.magsys.co.uk/delphi/magxfer.asp

Angus

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to