Hi,
does anyone know how to get the directory where a do file is placed from within Stata?
When I launch a do-file and Stata opens, I get the right folder where my do-file is placed. But if I open the do file from Stata and the do file is placed in a different folder from my pwd, how can I recover the folder where it is placed?
I am looking for something similar to the R library (this.path), which would be very helpful in my shared do-files.
Thanks!
does anyone know how to get the directory where a do file is placed from within Stata?
When I launch a do-file and Stata opens, I get the right folder where my do-file is placed. But if I open the do file from Stata and the do file is placed in a different folder from my pwd, how can I recover the folder where it is placed?
I am looking for something similar to the R library (this.path), which would be very helpful in my shared do-files.
Thanks!