Bookmark and Share

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, is already up and running.

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

Re: st: get the current path

From   Nick Cox <>
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.)


On Tue, Oct 23, 2012 at 10:22 PM, Nick Cox <> 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
> <> wrote:
>> Hello everyone,
>> Does anyone know how to get the current path of the file that is being
>> executed? i.e. if c:/foo/ 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:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index