471,342 Members | 1,687 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,342 software developers and data experts.

How to download latest file based on timestamp through FTP

Hello All,

I want to download latest file based on its timestamp from one FTP server.
So can you please tell me is there any way to find the timestamp of files
weather they are on local machine or remote server ?

I appreciate your help.

Regards,
sanket
Jul 27 '07 #1
3 4673
I am sorry...... I forgot to mention..........
I am using python 2.5 on my windows XP.......
Jul 27 '07 #2
I am sorry...... I forgot to mention..........
I am using python 2.5 on my windows XP.......
I found one library called ftblib. It did my work. It has got one functions which checks whether the remote file is newer than the local copy or not?
Feb 24 '08 #3
bvdet
2,851 Expert Mod 2GB
I found one library called ftblib. It did my work. It has got one functions which checks whether the remote file is newer than the local copy or not?
An FTP instance (module ftplib) has methods to retrieve a directory listing. From that listing you may be able to parse the time stamp. In the documentation, I did not see a direct way to retrieve a time stamp directly like os.path.getmtime(file_name).
Feb 24 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by Adam Monsen | last post: by
4 posts views Thread by Mark Harrison | last post: by
1 post views Thread by acdevteam | last post: by
5 posts views Thread by brett | last post: by
12 posts views Thread by devospice | last post: by
2 posts views Thread by aloke.sarnobat | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.