2

My company´s data department uploads a .csv file daily to a remote folder that I can only access through my company's network using FileZilla.

Everyday, I use the newest .csv file and process the data in R. I want to automate this process. I want to access the daily .csv file by reading the .csv file from the remote folder using the read.csv function in R.

How can I tell FileZilla to copy the file in the shared folder to a local folder in my PC and do this everyday at 6:00 a.m.? If this isn't possible, how can I access the remote folder through R and read the .csvfile from there?

Thanks in advance!

EDIT:

As seen here, FileZilla does not allow any sort of automation. You can use the client WinSCP instead, write a script to download/upload files from/to a remote SFTP server and schedule the script to run every n days using Windows Task Scheduler.

Now, in order to access an SFTP server from R, you can use the RCrul package. Unfortunately, this closed question (which was closed because it was not even a question to begin with) purges unwanted lines of code from an FTPserver (even though the title says SFTP) and it doesn't specify the user, password nor port specs. Moreover, it uses the write.lines() command, which as I understand, is used to create, not download files.

This question specifically refers to downloading a .csv file from a shared folder using SFTP protocol. Given that FileZilla is no good for this, how can I manage to do this in R using RCurl?

Arturo Sbr
  • 5,567
  • 4
  • 38
  • 76
  • So if you know now that FileZilla is irrelevant here, please tidy up your question accordingly. – Martin Prikryl Oct 26 '18 at 05:34
  • Plus the link, I've posted **is about SFTP** and **download** and **specifies username and password**. I do not see why you think it's about FTP and "creating file" (whatever you mean by that) - Did you even tried the code? – Martin Prikryl Oct 26 '18 at 05:42
  • Plus, when I google for "r sftp download", I get a lot of other relevant questions on Stack Overflow. – Martin Prikryl Oct 26 '18 at 06:08
  • 1
    @MartinPrikryl I don't want to tidy up the question. I think it's mportant to document that FileZilla cannot do this. As for the SFTP question you linked, please make sure you reference posts with readable grammar. To answer your question, yes, I tried that code but it didn't work. As I said, that post doesn't specify the port or userpwd specs. Anyway, I appreciate your help Martin. – Arturo Sbr Oct 26 '18 at 15:09

0 Answers0