Calling mod-files from subfolders

I am calling dynare codes from inside a matlab m-file and was hoping to call a mod-file from a subfolder, eg.

this gives the error message

It seems you are trying to call a mod-file not located in the "Current Folder". This is not possible (the / symbol is not allowed in the name of the mod file). The file RBC.mod,.dyn] could not be located!

I wanted to do this to keep my current folder clean. The aim was that rather than creating all of the additional dynare files (eg. RBC.log, RBC_static.m, RBC_dynamic.m, etc.) in my current folder they would be created within the ./CodeOutput/ folder. Is there a more direct way to do this? Is running codes from subfolders an intended feature in future versions of Dynare?

No, this is not planned, because it introduces many complications on different platforms. What you can already do in the unstable version is use the

command at the end of your mod-file to delete some of the files created by Dynare.

Okay thanks. Guess I will just wait for the current unstable to become stable.

You may add the Dynare subfolder by using addpath in your Matlab m file.

What you can also do is use

delete *.log delete *_dynamic.m delete *_static.m delete *_steady_state2.m delete *_results.mat delete *_set_auxiliary_variables.m delete *.eps delete *_pindx.mat delete *_params.mat