How to upload a file to a server via FTP using R?

file-upload, ftp, r

Solution

This should work:

library(RCurl)
ftpUpload("Localfile.html", "ftp://User:Password@FTPServer/Destination.html")

Where `Localfile.html` is the file to be uploaded, `User` indicates the user name and `Password` the password to log into the server while `FTPServer` is a placeholder for the server name and possible path to use while last but not least `Destination.html` is an example of the name the to be uploaded file gets on the server.

Problem

How to upload a file to a server via FTP using R?

Original source