Ftp all the generated files

Hi All,

I'm working on a ftp shell script in which I'm tranfering files from one sever to another using ftp.

Some program generates files at undefined time & throughout the day.
I have to transfer the files time to time.. i.e. once the file is generated, it should be transfered at the very moment or as early as possible.

If I write a script to transfer the latest file & schedule it wth maximum frequecy, say 3 mins/4 mins , then it'll be unnecessarily overwrite the files again and again.. even the question remains wht if there are 2 files generated in 3 mins.. only the latest file will get transfer.

Wht should be done to tackle with this..
Any suggestions?

Thanks in advance.

Regards,
im_new

you only want to transfer the latest file?
one way
1) create a dummy file
2) use the find command and the -newer option. check the man page of find
3) if its newer, transfer the file
4) update the dummy file with the time stamp of that latest file
5) and so on

Thanks for the suggestion..
Actually the files are having format as- unique'timestamp'.rtf e.g
UNIQUE20071219030529.rtf

& the filename changes as per the timestamp.
Hw can I keep track of these files?

it doesn't matter, as the file is created, it will have an OS time stamp. Use the OS time stamp should be ok.