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:28:18 +0100

Strictly, what I mean is that

programs defined by ado-files can call other programs defined by
ado-files, and so on,

and should point out that how programs are defined is secondary here.
(A program _could_ be defined interactively, although few ever are
unless they are very short.)

Nick

On Tue, Oct 23, 2012 at 10:22 PM, Nick Cox <[email protected]> wrote:
> 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...

*
*   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