Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: get the current path


From   Nick Cox <[email protected]>
To   [email protected]
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
<[email protected]> 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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index