Message Boards Message Boards

GROUPS:

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

Posted 1 year ago
1643 Views
|
3 Replies
|
0 Total Likes
|

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
Answer
3 Replies

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

Posted 1 year 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
Answer

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?

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