Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: path to folder prob


From   "n.j.cox@durham.ac.uk" <n.j.cox@durham.ac.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: path to folder prob
Date   Wed, 21 May 2008 07:57:02 -0700

First, don't use backslashes here even if they don't appear problematic.
Use forward slashes, even under Windows, as often recommended on this
list. This is flagged in [U] too. (\ is an escape character for Stata.)
We have going to publish that one as a Tip in the SJ, even though it is
quite explicit in the manual, because so many people don't notice or
forget, and get burned, that it deserves maximum publicity.

Second, the " " are problematic here. Stata doesn't need them and won't
strip them.

cd "c:/Users/`c(username)'/Documents"

is what I would try.

Martin Weiss

I am wondering whether there is a way to have Stata -cd- to a certain
directory on two different computers which only differ in the name of
the
user profile? In other words, is there a way to have Stata -cd- to the
user`s "my files" on Windows Vista Business reliably? Among the values
thrown up by -cret li- I judge only "c(username)" to be promising.
However,
when I instruct Stata to

****************
cd C:\Users\"`c(username)'"\Documents
****************

or

****************
cd C:\Users\`c(username)'\Documents
****************

Stata complains about "invalid syntax r(198)". Is there a way to achieve
this?

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

Privileged, confidential or patient identifiable information may be contained in this message. This information is meant only for the use of the intended recipients. If you are not the intended recipient, or if the message has been addressed to you in error, do not read, disclose, reproduce, distribute, disseminate or otherwise use this transmission. Instead, please notify the sender by reply e-mail, and then destroy all copies of the message and any attachments.

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index