Re: Downloading most recently modified files
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 allenr...@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. -- http://mail.python.org/mailman/listinfo/python-list
Re: Downloading most recently modified files
On Sun, May 10, 2009 at 1:04 PM, AllenLars allenr...@gmail.com wrote: 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 Well, start by separating out the date and the file name. You'll want the date for sorting, and the file name for when you decide to download it. If you want help with regular expressions, let me know. If so, post a sample of the code you have so far for parsing, sample input (the raw listing), and sample output showing exactly how you want it to look. As long as you write some code (even if it's not working the way you want), I don't mind helping you fix it up. -- http://mail.python.org/mailman/listinfo/python-list
Downloading most recently modified files
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. -- View this message in context: http://www.nabble.com/Downloading-most-recently-modified-files-tp23432457p23432457.html Sent from the Python - python-list mailing list archive at Nabble.com. -- http://mail.python.org/mailman/listinfo/python-list
Re: Downloading most recently modified files
On Thu, May 7, 2009 at 2:19 PM, AllenLars allenr...@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