[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Function that writes the location of the current do-file ?
Usually, when writing a do file, the first lines are like this:
set more off..
cd c:/project/data // !!!!!!
The problem is that, when using the do files on different computers,
or giving the data + do-files to a colleague, they have to change each
do-file to match the location of the data (ie, change cd
c:/project/data to cd "c:/my documents/john/reviews/data")
My question is, is there a way to do something like
Where `currentdofile' gives the path to the do file currently running.
Assuming that the do files are in a folder like c:/project/prg , then I can
And I don't longer have to update locations if the path changes.
I'm aware that other languages do this, but i don't know if there is
any way to do this in Stata.
* For searches and help try: