Message Boards Message Boards

Avoid error message: "Could not access the directory"?

Posted 5 years ago

Hi,

I ran multiple Mathematica files using the the NoteBookOpen/NoteboookEvaluate options. Now once the run is over, I am not able to save the files. I get the error message - "Could not access the directory. You should check the directory's permission." Here is the part of my code to run the first of the files and so on...

File1 = NotebookOpen[ "C:/....."]; 
SelectionMove[File1, All, Notebook] 
SelectionEvaluate[File1]

Would be thankful for any suggestion.

POSTED BY: S G
5 Replies
Posted 13 days ago

Have you checked your permissions? You can also check to see if the notebook is open somewhere else and is not blocked by another process.

POSTED BY: Anne Johns
Posted 13 days ago

Perhaps not for the same reason, but I recently had the same problem. It was resolved by adding Mathematica (now Wolfram) to the apps with Full Disk Access (under system Privacy & Security settings). If you've arrived here looking for a solution, I suggest you give it a try.

POSTED BY: Updating Name
Posted 5 years ago

I suspect the error message is misleading. Mathematica probably has a handle to the open file which is preventing the save. Why not just use NotebookSave?

POSTED BY: Rohit Namjoshi
Posted 5 years ago

I tried saving them as I usually do.. Either by Control+S or by going for "Save" or "Save As" options. Even quitting kernel was of no help.

Interestingly, I am able to save the files in any other folder with different names, which is very frustrating for large number of files. Would prefer to be able to save them by usual methd.

Will appreciate any help on that. Thanks

POSTED BY: S G
Posted 5 years ago

What exactly are you doing to "save the files"?

POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract