On a Macintosh: assume a file "F1" is in a directory "D1" in the current NotebookDirectory, and a file "F2" is in a directory "D2" somewhere else, and an alias "A2" to D2 is in the current NotebookDirectory. Construct pathnames:

P1 = FileNameJoin[{NotebookDirectory[],"D1","F1"}]
P2 = FileNameJoin[{NotebookDirectory[],"A2","F2"}]

P1 works, but P2 does not. Am I making a mistake? Is there a work-around?

This situation arises because I am running both MacOS and Windows on a Macintosh. Directory D2 contains files that are changed daily by a Windows program, files which I wish to process with Mathematica (on the MacOS). Rather than daily dragging (copying) a hundred files from D2 to D1, the clean and easy solution is to use an alias. Any solutions?

  • $\begingroup$ can you use a symbolic link instead? $\endgroup$ – george2079 Jan 29 '18 at 20:03
  • $\begingroup$ If by "alias" you mean the aliases created with the Finder, then this won't work. I think aliases are not a standard file system feature (unlike symlinks), therefore only those programs will handle them which were specifically written to be alias-aware. $\endgroup$ – Szabolcs Jan 30 '18 at 7:57

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.