I am planning to download a large number of files from some website. I am
using the following script.

files2down = c('aaa', 'bbb', ................)
for (i in 1: len)
{
print(paste('downloading file', i, ' of total ', len));
url = paste(urlPrefix, files2down[i], sep='')
destfile = paste (dest, 'inDir', files2down[i], sep='/' )
download.file(url, destfile, quiet = FALSE)
}

It works fine as long as the file is present. When the file is not present,
it exit from loop. Is there a way to continue looping if error occurs.
Thanks



-- 
-------------
Mary Kindall
Yorktown Heights, NY
USA

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to