I guess I would just comment that for many tasks I try to keep the work in dedicated tools. In this case, command line versions of curl or even wget. The reason is things like this that come up talking to foreign entitites. Also the learning curve can be amortized over many other efforts that require same file transfers etc. I just mention this for rebuttals from R experts.
---------------------------------------- From: ome...@laposte.net To: r-help@r-project.org Date: Mon, 22 Nov 2010 18:33:07 +0100 Subject: [R] RCurl : All connection are used ? Hi everybody, I got a problem with the ftpUpload function from the RCurl package. My goal is to Upload a lot of files from a local directory to a web server. 1st try : for (i in 1:length(file)){ ftpUpload(what=files[i],to=files[i]) } At i=11 I get : (my server has only 10 available open connections available) : Erreur dans curlPerform(url = to, upload = TRUE, readfunction = uploadFunctionHandler(what, : Got a 421 ftp-server response when 220 was expected 2 nd Try : ftpConnection=getCurlHandle(userpwd=ftp$userpwd,maxconnects=1,fresh.connect=0) for (i in 1:length(file)){ ftpUpload(what=files[i],to=files[i],curl=ftpConnection) } And I got this error after 30 files (the error is not linked to the web server but to the R session) : Error in file(file, "rb") : all conection are used I read the documentation and the options from curl library but I can't find how to solve my problem even if I think that the problem is linked to not closing the position I opened. Do you have any idea how to solve it ? Thanks, Olivier Merle Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ? Je crée ma boîte mail www.laposte.net [[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. ______________________________________________ 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.