Well,
The server is linux
And it does support FEAT as far as I know.
The problem is,
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.

Best regards

----- Original Message ----- From: "Arno Garrels" <arno.garr...@gmx.de>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Monday, October 12, 2009 11:36 AM
Subject: Re: [twsocket] ICS FTP: How to check if file is newer?


Signed Source® Project wrote:
Hi guys,
I have a local file --> setup.exe
and remote file --> setup.exe which is placed on my ftp and which
changes periodly.

There is no simple way that works for all servers.
First you have to issue the FEAT command to know what features are
supported by the server.

FEAT
< 211-Features:
<  LANG en
<  MDTM
<  UTF8
<  REST STREAM
<  SIZE
< 211 End

If the server supports MDTM you issue the MTDM command:

MDTM setup.exe
< 213 20050611132323
Request MdtmAsync Done.
StatusCode = 213
LastResponse was : '213 20050611132323'

If MLST is supported you issue the MLST command:

MLST setup.exe
250-Begin
type=file;size=25489;modify=20050611132323';setup.exe
250 End

This is a multi-line response on the control socket.

In the worst case you have to issue the LIST command
(method "Dir") and parse the response stream (or file).
Dir opens a data connection and downloads the file
listing.

LIST Certs.zip
< 150 Opening ASCII mode data connection for file list
DATA: "-rw-r--r--   1 xc4mj166  wwwuser      5908 Jun 11  2005 Certs.zip"

The list format is not a standard format and looks different
depending on the server OS! Also file times are only included
for files of the current year (Linux).

If the server supports checksum commands, for example MD5 or CRC,
you could compare the local and remote checksum.

--
Arno Garrels

--
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