Downloading most recently modified files

AllenLars allenreas at gmail.com
Sun May 10 13:04:04 EDT 2009


Thanks Shawn.  I went through the ftplib info and I was able to generate a
list.  I am needing to figure out parsing the list. 

AllenLars

Shawn Milochik wrote:
> 
> On Thu, May 7, 2009 at 2:19 PM, AllenLars <allenreas at gmail.com> wrote:
>>
>> I am trying to code a script that will allow me to go to ftp site and
>> download files based on most recently modified file (date, time).  I am
>> brand new to programming.  Any and all help is appreciated.
>> --<snip>
> 
> 
> I've actually written code to do this, and it's fairly easy. Just use
> the FTP module to run the "ls" (directory listing) command and parse
> the results to get the filenames and timestamps. Then you will be able
> to easily do download requests for the file(s) you want.
> 
> Perhaps someone else on the list can chime in with a more elegant
> solution.
> 
> Here's enough to get you started:
> 
> from ftplib import FTP   #(http://docs.python.org/library/ftplib.html)
> 
> ShawnMilo
> --
> http://mail.python.org/mailman/listinfo/python-list
> 
> 

-- 
View this message in context: http://www.nabble.com/Downloading-most-recently-modified-files-tp23432457p23471969.html
Sent from the Python - python-list mailing list archive at Nabble.com.




More information about the Python-list mailing list