Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am experiencing an error attempting to save a modified Notebook in Mathematica 10 under Windows.

The error I get is:

Could not access the directory X:\Docs\\Mathematica. You should check that directory's permissions.

Note the doubled \\. The correct path is X:\Docs\Mathematica.

NotebookDirectory[] returns the correct (escaped) path:

NotebookDirectory[]
"X:\\Docs\\Mathematica\\"

Correction: This is happening with multiple (all?) Notebooks in this path in the current session.

Has anyone else experienced this error? How can I determine its cause and seek a solution?

share|improve this question

1 Answer 1

For the aid of anyone else who runs into this issue I seem to have figured out the compounding factors necessary to recreate this problem.

  1. Create a Windows directory C:\foo\bar

  2. Save arbitrary Notebook example.nb to this directory

  3. Using the Option Inspector add to NotebookPath exactly: "C:\\foo\\bar"

  4. Close and restart Mathematica

  5. Create a new Notebook and run NotebookOpen["example.nb"]

  6. Modify the content of example.nb and attempt to save it

The fix for the problem seems to be as simple as changing the NotebookPath entry to:

"C:\foo\bar"

Why the problem occurs I don't know. Clearly the escaped string \\ form is accepted as the Notebook is found by NotebookGet but apparently it isn't recognized during the save process. The problem also doesn't happen with a single level path such as "C:\\foo".

share|improve this answer
    
"100k" pop up with me. Thanks for your rare combination of politeness and knowledge :) –  eldo Jul 16 at 20:27
    
@eldo Thank you. –  Mr.Wizard Jul 16 at 23:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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