Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

r

file-upload

ftp

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

like image 416
Tal Galili Avatar asked Sep 01 '10 17:09

Tal Galili


People also ask

How do you send files to an FTP address?

To do this, open a Windows' File Explorer window and type ftp://[server name] or ftp://X.X.X.X where 'X' symbolizes the IP address of the FTP server, e.g. the IP address of your cRIO controller. You can then copy and paste files to or from the server like you would do with any normal folder on your storage as well.

How do I upload a file to a server?

The commonly way to upload data to the server is using FTP client. FTP (File Transfer Protocol) is used to transfer data from one computer (your personal computer) to another computer (webserver). FTP client looks like File Manager and you can copy (upload, download) files here from one computer to another computer.


1 Answers

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.

like image 83
petermeissner Avatar answered Sep 28 '22 03:09

petermeissner