Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: sysdir set for do-files or datasets ?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: sysdir set for do-files or datasets ?
Date   Thu, 18 Dec 2003 13:17:42 -0000

Nick Winter's program is very useful; but the
implication here that the only alternative is
using full directory names is incorrect.

I can change to a parent directory in
Stata by

. cd ..

and to a child directory by

. cd other

and to another subdirectory in the same
directory by

. cd ..\another

or

. cd ../another

This is a little more typing than -c-, which
is where the latter clearly scores, but it
is a lot less than typing out the fullnames
(or doing it through WIMP). The idea of
going up a level of the tree, down a
level of the tree, etc. is also a pleasant
reminder of our forebears' arboreal existence.

Nick
[email protected]

P.S. that's not a reference to the University
of Michigan, alma mater of many
distinguished Stata users.

Buzz Burhans

> I use an ado program by Nicholas Winter called -c-
> (referred to as fastcd
> on SSC in the post in this thread by Ulrich Kohler) to
> speed up changing
> directories, which is easily done  within do files by
> something like this:
>
> pwd
> C:\Documents and Settings\Buzz Burhans\My Documents\Active 6
> GlycolStudyWorking9-9-02\NEFA
>
> * suppose I start in the above directory
>
> . c MH
>
> * the results of this command are:
>
> C:\Documents and Settings\Buzz Burhans\My Documents\Active 6
> GlycolStudyWorking9-9-02\3MH
>
> * after which I can work in that directory
>
> .save fileX, replace
>
> * and then later change to my original or other directory
> easily by using
> -c- again:
>
> . c NEFA
>
> C:\Documents and Settings\Buzz Burhans\My Documents\Active 6
> GlycolStudyWorking9-9-02\NEFA
>
> As you can see, typing a short keyword saves a lot of
> typing in defining
> the directory.
>
> I am grateful to Nick Winter for making this available, it improves
> efficiency a lot.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index