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