Re: [twsocket] file size in tftpclient server

2014-06-27 Thread Angus Robertson - Magenta Systems Ltd
> I could not install more in Delphi XE6, seem to only have to XE4
> version

It only takes a few seconds to update the XE4 package to XE5 or XE6.
I only have time to update my free components about once a year. 

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


Re: [twsocket] file size in tftpclient server

2014-06-26 Thread {Dark_Ducke}
hello, thank you for responding, I could not install more in Delphi XE6,
seem to only have to XE4 version, you can not make the ICS component
TClientFtp? I have an example working with indy, more like ICS use in the
project would like to use FTP also ...

Thank you again!


2014-06-26 7:17 GMT-03:00 Angus Robertson - Magenta Systems Ltd <
an...@magsys.co.uk>:

> > how to get the size of the file will be downloaded from the ftp
> > server to make a progressbar in onProgress event?
>
> There are several ways of finding the size of a file, depending on which
> commands the FTP server supports.  The easiest is MLST which gets size and
> time
> stamp for a single file, if not try MDTM which is similar, next LIST with a
> file name argument may return a single file, but not on all servers, so
> finally
> you LIST the whole directory and find the single file you care about, after
> parsing the directory listing, that maybe in several different formats.
>
> The much faster way is download the free Magenta Systems File Transfer
> Components:
> http://www.magsys.co.uk/delphi/magxfer.asp
>
> and use the TMagFtp component which is a high level FTP component hiding
> all
> the differences between FTP servers from you, and allowing you to download
> or
> uploaded hundreds of files, including sub-directories, with a single
> command.
>
> There is a single function that does exactly what you need:
>
> function TMagFtp.FtpCheckFile (const RemDir, RemFile: string ; var FSize:
> Int64;
> var FileUDT: TDateTime): boolean;
>
> and another that will download a single file, providing a progress event
> with
> percentage done and estimating time left to complete.
>
> function TMagFtp.FtpDownOneFile (const FdirSrc, Fnamesrc, Fnametar: string
> ;
> Replopt: TFileCopyRepl) : TTaskResult ;
>
> When downloading multiple files, the progress event gives details for both
> the
> current file and the whole job.
>
> 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


Re: [twsocket] file size in tftpclient server

2014-06-26 Thread Angus Robertson - Magenta Systems Ltd
> how to get the size of the file will be downloaded from the ftp 
> server to make a progressbar in onProgress event?

There are several ways of finding the size of a file, depending on which
commands the FTP server supports.  The easiest is MLST which gets size and time
stamp for a single file, if not try MDTM which is similar, next LIST with a
file name argument may return a single file, but not on all servers, so finally
you LIST the whole directory and find the single file you care about, after
parsing the directory listing, that maybe in several different formats.  

The much faster way is download the free Magenta Systems File Transfer
Components:
http://www.magsys.co.uk/delphi/magxfer.asp

and use the TMagFtp component which is a high level FTP component hiding all
the differences between FTP servers from you, and allowing you to download or
uploaded hundreds of files, including sub-directories, with a single command.  

There is a single function that does exactly what you need:

function TMagFtp.FtpCheckFile (const RemDir, RemFile: string ; var FSize: Int64;
var FileUDT: TDateTime): boolean;

and another that will download a single file, providing a progress event with
percentage done and estimating time left to complete. 

function TMagFtp.FtpDownOneFile (const FdirSrc, Fnamesrc, Fnametar: string ;
Replopt: TFileCopyRepl) : TTaskResult ;

When downloading multiple files, the progress event gives details for both the
current file and the whole job. 

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