2
$\begingroup$

I would like to Import files which are stored at a password-protected remote server. Because the server is protected by a password SetDirectory["/server/folder"] fails. Are there any ideas how to fetch the files?

$\endgroup$
  • 2
    $\begingroup$ Did you try to use Import directly? It's supposed to present an interactive authentication dialog if necessary $\endgroup$ – Lukas Lang Jun 7 '18 at 11:09
  • $\begingroup$ Yes, I did try to use Import directly. I didn't get the interactive dialog. Just showed the error message: File not found during import $\endgroup$ – RMMA Jun 7 '18 at 11:25
  • 1
    $\begingroup$ Then your server is probably using some authentication scheme that MMA does not support - can you provide more details regarding the server? What type of server is it? How do you normally access it? ... $\endgroup$ – Lukas Lang Jun 7 '18 at 11:40
  • $\begingroup$ The Server is a Windows Server 2016 Standard 6.3, I occasionally copy files from the server using smbclient. $\endgroup$ – RMMA Jun 8 '18 at 7:22
  • $\begingroup$ @RMMA did the suggestion in my answer work for this? $\endgroup$ – GenericAccountName Jun 20 '18 at 21:36
5
$\begingroup$

Try Import["/server/folder", "Username" -> "username", "Password" -> "password"]

EDIT: For the record, this works if you can access the file from a browser, and it prompts you for a User/Pass.. This is an intended but undocumented feature of Import.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.