By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,100 Members | 2,495 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,100 IT Pros & Developers. It's quick & easy.

How to download latest file based on timestamp through FTP

P: 16
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
Share this Question
Share on Google+
3 Replies


P: 16
I am sorry...... I forgot to mention..........
I am using python 2.5 on my windows XP.......
Jul 27 '07 #2

P: 16
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
Expert Mod 2.5K+
P: 2,851
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.