Change Working Directory (pwd) to Script Location in Stata 12
I have a lot of scripts (.do files) in different folders, which are
frequently moved around. I would like to have Stata detect where the
script is, and use that as a pwd (working directory). I know people that
have this functionality seemingly by default (the pwd is changed to the
script location when the script is run), but we cannot figure out why I am
not so lucky. It is a bit tedious always having a "cd" line at the top of
my scripts, and having to change this line to reflect the current
directory. I'm using Stata 12 with Windows 7 Professional.
No comments:
Post a Comment