How to upload a file to a server via FTP using R?
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With