I want to import a file from a directory on a ftp using sftp. I'm not sure how the command looks, but here is what I have tried (based on this older post):

Import["sftp://username:[email protected]/homeDIR/folder/test.txt"];

However, this gives me an error: ... is not a valid file, directory, or URL specification.

  • $\begingroup$ The documentation for Import states that "When importing from a URL, Import can handle http, https, and ftp." There is no reason AFAIK to believe that Import would handle SFTP, which is a different protocol not closely related to FTP. $\endgroup$
    – C. E.
    Feb 20, 2015 at 10:00
  • 1
    $\begingroup$ @C.E. It still remains a good question how to do this though. Is there any way to import from sftp directories? (There certainly are ways of course, just by using Run and using terminal (or other os equivalent) commands.) But is there an actual practical and reliable way to do this? $\endgroup$
    – Kvothe
    Oct 8, 2018 at 16:46


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.