| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: using pwd in an if statement
Thank you, Nick and Nick, for the advice.
I installed the -fastcd- package, and it works nicely.
So if I want to keep everything related to one project (command log,
output log, data) in that project's directory, then my choices seem to be:
1. always use full path names
2. always -cd- to the proper directory at the beginning of a Stata
session (or the beginning of a do-file), using full path name or the
-fastce- package, and then can use relative (short) file names.
Do I have that right?
--Chris
--
Christopher W. Ryan, MD
SUNY Upstate Medical University Clinical Campus at Binghamton
and Wilson Family Practice Residency, Johnson City, NY
cryanatbinghamtondotedu
GnuPG and PGP public keys available at http://pgp.mit.edu
"If you want to build a ship, don't drum up the men to gather wood,
divide the work and give orders. Instead, teach them to yearn for the
vast and endless sea." [Antoine de St. Exupery]
Nick Winter wrote:
The package -fastcd- on SSC has a utility called -c- designed for just
this sort of issue. It allows you to set up a set of associations
between directory and mnemonics-- such as "hannah" for
"C:\data\scholar\Hannah", and so on. Then you can type "c hannah" and
you will be switched to that directory.
The package name is fastcd; once you install the package, note that you
have to type
. help fastcd
for help. The command, howver, is "c". This is a side effect of me
naming the command a single letter--something Stata advises against.
Stata has subsequently taken back "help c" to point to help on the c()
macros.
--Nick Winter
*
* 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/