Question about how to ftp download the latest file from a directory

Dear all,

Hope you are doing well.

I am in trouble to write a shell for ftp downloading the latest file from remote server.

Situation:
There is a directory named 'weekly' which contains .csv files with the following pattern: RES_EN_100417-080003.csv.Z. The new file is generated weekly. (e.g. 100417 means 17 Apr 2010) What i need to do is to write a sh script to download the latest file.

Can anyone kindly help?

Regards,
KK

---------- Post updated 04-22-10 at 12:06 AM ---------- Previous update was 04-21-10 at 09:38 PM ----------

Anyone can help please?:frowning:

Do a search for "ftp latest" in this forum.

Please mention the Operating System of each computer and where the ftp software came from (if it is not standard issue with that Operating System).
Do you have full admin rights on both computers?

HI methyl,

Really thanks for your reply.

To be honest, I am new to ftp command. I was asked to perform this task by "chance"....

Well, the situation is that I want to schedule a job from my Window server to ftp download a latest file from a directory in a linux server. A 'new' file is generated weekly in that directory. So, I want to white a script to get it weekly.

I know there are some previous posts talking about similar things. However, I am not an IT guy. I feel helpless to understand those.

Please kindly advice me what to do...

Regards,
Kelvin