MATLAB: MATLAB no longer able to save files

errorMATLABsave

I'm trying to save a matlab file I'm working on, but whenever I click save, it gives me this error and is unable to save the file:
This is on a new script. When I try and save changes to an old file, it gives me this error:
I've had MATLAB on my computer for a few months and haven't had any similar problems until today. I have tried restarting MATLAB, restarting my computer, uninstalling and reinstalling MATLAB, and running MATLAB as an administrator. I am able to save in C:\Users\username, but not in C:\Users\username\Documents. The error occurs even in new files with just a test comment.

Best Answer

Your virus scanner can block the access to the Documents folder to impede crypto locker, e.g. BitDefender does this. So check if Matlab is a trusted application in the preferences of your anti virus software.
Do you have access to the folder in the Windows Explorer? Can you create files and folders inside it? If not, maybe you have changed the privileges for this folder by accident. Check the permissions of the folder.
Related Question