in reply to comparing files after FTP
stat only works on a file sytem mounted on the machine you are running from. You might be able to do something with:
(Sorry I don't have an ftp server to play with)
update: do like vek says and use the size method.