Running mod file in different directory

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Running mod file in different directory

Postby pcb » Wed Jan 22, 2014 8:04 pm

Hi, this is a very simple question. How can I run the .mod file without having to change to the directory where I have my .mod file? Say I have a myfile.mod sitting on /MYDIR/. I have tried the following from Matlab's command line:

Code: Select all
dynare('MYDIR/myfile.mod')

dynare(strcat(pwd,'/MYDIR/myfile.mod'))


Non of these works, is this even possible?

Thanks!
pcb
 
Posts: 8
Joined: Mon Aug 27, 2012 4:13 am

Re: Running mod file in different directory

Postby jpfeifer » Thu Jan 23, 2014 7:43 am

That is simply not possible. Why do you want to stay in a different directory?
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Running mod file in different directory

Postby pcb » Thu Jan 23, 2014 1:41 pm

Thanks for the reply. I want to do this because I have a main script that calls an mod file and other functions and would like to keep all my Dynare related files in a different directory to avoid cluttering my main directory. For now the main script manually change the directory to where my mod file is to run Dynare and then go back to the main directory, but I was hoping for a simpler way to do it.

Thanks again!
pcb
 
Posts: 8
Joined: Mon Aug 27, 2012 4:13 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 6 guests