2
$\begingroup$

I'm having some issue with Import and AbsoluteFileName used together with FileNames. Take for example this:

Through[{Import, AbsoluteFileName, FileExistsQ}@First@FileNames["*.txt"]]

When I SetDirectory to a local directory (e.g. C:/Users/...), this works, i.e. it returns {"content","C:\Users\...",True}. If instead I'm on a network folder (i.e. //server/share/...), I get either {"content",$Failed,True} or {$Failed,$Failed,True}. I have not yet been able to find any pattern to when it's working, and AbsoluteFileName seems to never work. I can be both results (failed and successful Import) on the same network share. The tested paths contain both spaces and no spaces, and no other special characters.

The network folder was added by going to "Add network address" in Windows Explorer.

The question now is: Why is Import sometimes failing, and how do I get AbsoluteFileName to work?

$\endgroup$
  • 3
    $\begingroup$ This is something support@wofram.com should know about $\endgroup$ – halirutan Mar 13 '18 at 17:49
  • $\begingroup$ @halirutan I just wanted to ask here first in the case I missed something obvious. But I have reported the issue now, and will update the post if I hear back from them $\endgroup$ – Lukas Lang Mar 14 '18 at 8:48
  • $\begingroup$ AbsoluteFileName similarly fails if you explicitly give it the full path ( \\\\server\\.. ). I haven't found an instance of Import failing though ( and I use for server files so often I think I would have noticed.. ) $\endgroup$ – george2079 Mar 14 '18 at 14:13
  • $\begingroup$ It seems that 11.3 fixed all the issues I had... I will update MMA on a few more PCs in the next days and check there - if everything goes well, I'll close this as fixed $\endgroup$ – Lukas Lang Mar 15 '18 at 22:51

Your Answer

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

Browse other questions tagged or ask your own question.