[R-sig-Geo] getting subfolders in a directory on FTP (MODIS)

alexandre villers alexandre.villers at cebc.cnrs.fr
Tue Jul 14 10:46:34 CEST 2009


Good morning,

I know this is not exactly a question for R SIG GEO, but as it may interest beginners like me who work with MODIS data... (and I'm hoping I'm not the only beginner on the list !)
I adapted the script of Tomislav Hengl (again thank you for your wiki page! http://spatial-analyst.net/wiki/index.php?title=Main_Page) to download snow cover MODIS data form NSIDC (http://nsidc.org/) from their ftp site (the data I'm interested in lie in ftp://n4ftl01u.ecs.nasa.gov/SAN/MOST/MOD10CM.005/ <-- monthly snow cover). MODIS data are stored in subfolders named by their dates and I already had the same troubles with other MODIS data. How do I get the list of subfolders name directly from R and thus the dates of satellite pictures ?
For the moment, what I've been doing is going on the ftp via my browser, copy and paste the whole page in a .txt file and manage that with excel to get the dates... But I don't really like doing it that way.

So if anyone could guide me to a R function that would do that (or to the different functions if it's not straigthforward)...

Best regards


Alex
Alexandre Villers
PhD. Student
Team Biodiversity
CEBC CNRS
79360 Beauvoir sur Niort


__________ Information from ESET Mail Security, version of virus signature database 4240 (20090713) __________

The message was checked by ESET Mail Security.
http://www.eset.com



More information about the R-sig-Geo mailing list