Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Nick Cox <njcoxstata@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: get the current path |

Date |
Tue, 23 Oct 2012 22:22:10 +0100 |

I think the short answer is that 1. You, the user, can always keep track of what you are using. 2. It's equally true that what is being executed is not accessible to the user as a single path, not least because it need not be one. Given that do-files can call other do-files, and so on, and do-files can call ado-files, and so on, and ado-files can call ado-files, and so on, there can easily be a complicated nested hierarchy. So, the current do-file may be uniquely defined if there is just one, but it's not a Stata concept given the possibility of a hierarchy. Any way, what difference would it make? Nick On Tue, Oct 23, 2012 at 8:55 PM, Sun Yutao <yutao.sun.statalist@outlook.com> wrote: > Hello everyone, > > Does anyone know how to get the current path of the file that is being > executed? i.e. if c:/foo/bar.do is being executed, then how do I know by some > command that it's c:/foo/ > > I don’t need the working dir... > > Best regards, > Sun Yutao > > > > > > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/faqs/resources/statalist-faq/ > * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: get the current path***From:*Nick Cox <njcoxstata@gmail.com>

**References**:**st: get the current path***From:*Sun Yutao <yutao.sun.statalist@outlook.com>

- Prev by Date:
**st: RE: RE: RE: RE: different results ivregress ivreg2** - Next by Date:
**Re: st: get the current path** - Previous by thread:
**st: get the current path** - Next by thread:
**Re: st: get the current path** - Index(es):