Filesystem error: cannot remove all [YjLu0asVxy]

Hi,

I am using dynare_version ‘4.6.3’ under Windows 10.

I am trying to run dynare from Matlab using the statement

eval([‘dynare ‘,ModFileName,’ noclearall nostrict’]);

The program runs correctly for the first time. However, when I try to run again I obtain the error

terminate called after throwing an instance of ‘std::filesystem::__cxx11::filesystem_error’
what(): filesystem error: cannot remove all [YjLu0asVxy]

I saw that I can fix the problem deleting the folder creater after the first execution, using

[~,~]=rmdir([’+’,M_.fname],‘s’),

where fname is the name of matlab file after preprocessing.

Is there a better way to fix the problem?

Thank you

Unfortunately, no. Dynare will try to delete that folder itself, but sometimes this operation is blocked. On my machine that happens particularly if the folder is synchronized by a cloud drive.

1 Like