Dynare launch error

Dear All:
I install dynare 4.4.3 and 4.57 (matlab R2021b) on my win10 system. And I already use addpath command to add directory of matlab…( Select the “Set Path” entry in the “File” menu, then click on “Add Folder…”, and select the ‘matlab’ subdirectory of your Dynare
Installation). But still, when I use command “dynare fs2000.mod” (or other files) the error message shows as following:

dynare fs2000.mod

Configuring Dynare …

[mex] Generalized QZ.

[mex] Sylvester equation solution.

[mex] Kronecker products.

[mex] Sparse kronecker products.

[mex] Local state space iteration (second order).

[mex] Bytecode evaluation.

[no] k-order perturbation solver.

[mex] k-order solution simulation.

[no] Quasi Monte-Carlo sequence (Sobol).

[mex] Markov Switching SBVAR.

Using 64-bit preprocessor

Starting Dynare (version 4.5.7).

Starting preprocessing of the model file …

Substitution of endo leads >= 2: added 1 auxiliary variables and equations.

Found 15 equation(s).

Evaluating expressions…done

Computing static model derivatives:

  • order 1

Computing dynamic model derivatives:

  • order 1

ERROR: Can’t open file fs2000.m for writing

Error using fprintf

Invalid file identifier. Use fopen to generate a valid file identifier.

Error in dynare (line 223)

fprintf(fid, ‘%s’, result);strong text

It seems you don’t have the necessary write permission. Often the culprit is an antivirus program or a cloud drive.

Thanks for your prompt reply, jpfeifer! You were right!