Dynare directory+filename not work

I need do not use change directory comand (cd) in matlab,
because parfor not support cd,
how can I do dynare in different directory?
dynare directory+filename not work


how can I change M_, oo_, options_ from global to ** in order to support matlabpool ?

this is because in dynare.m
in last line "evalin(‘base’,fname) not support path

how solve?

We do not plan to change this.

You can simply do:

cd [directory]
dynare [filename]

because cd in one lab(matlabpool), it also executes on all labs.
so can’t use cd, addpath, or rmpath command.