Error saving .mod file

Dear Dynare users,

my problem is the following: whenever I want to edit a .mod file in MATLAB (change any part of the .mod file) and than save it, the following message pops up in the MATLAB Editor:

The text in the brackets is in Slovene and it says: “The process cannot access the file because it is being used by another process”. I already searched for every possible help via Google and could not get a proper answer or even a hint what to do. I would really appreciate any help. Thank you very much in advance.

Best,

Jan

Did you try the same in folder with a shorter name? It might be that you are hitting the constraint for the length of paths.

Dear Mr. Pfeifer,

I tried, but it seems to be general problem for all .mod files, regardind the length of the path.

Kind regards,

Jan

Does your antivirus or group policy block files with that extension?

Also, Can you create a new mod file and save it? Did you try to edit and save mod files with another editor?

Dear Mr. Pfeifer and Mr. Adjemian,

I checked the antivirus policy and the problem seems not to lie there. Regarding the group policy, I don’t really know what this is. What concerns the creation of new .mod files, I am able to create and also save them, but once I close, re-open and try to edit the existing .mod file, I simply can not do it. I also tried to edit .mod files in computer’s notepad and it works perfectly.

Kind regards,

Jan

The question is whether you have admin privileges when opening Matlab. If not, your admin may have blocked certain actions

Dear Mr. Pfeifer,

if this is somehow related to question if I can run MATLAB as admin than my answer is positive. I have MATLAB installed on my personal computer and I am able to open it as admin. I also forgot to mention and it may be relevant, that errors with saving .mod files occured once I installed MATLAB 2014a (my previous MATLAB version was 2012a and everything worked perfectly).

Kind regards,

Jan

So if you run Matlab as an admin, does the problem saving mod-files persist?

Dear Mr. Pfeifer,

yes the problem of saving .mod files persists.

Kind regards,

Jan

Unfortunately, I am out of ideas. Are you working in a folder where you have write permission? Have you tried changing the default program to open mod-files? They are registered as movies on your machine. Maybe there is another program that accesses them as soon as they are created.