<>
Note this detour with the -local- is quite unnecessary:
*************
local sysdir: di c(sysdir_stata)
di "`sysdir'ado/plus/"
//easier way for the same result
di "`c(sysdir_stata)'ado/plus/"
*************
HTH
Martin
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Hoffman, George
Sent: Samstag, 9. Januar 2010 23:04
To: [email protected]
Subject: st: RE: RE: RE: RE: RE: RE: global macro for system directory?
Despite the odd appearance of the resulting paths, the following works in
my profile.do:
local sysdir: di c(sysdir_stata)
sysdir set PLUS "`sysdir'ado/plus/"
sysdir set PERSONAL "`sysdir'ado/personal/"
sysdir set OLDPLACE "`sysdir'ado/oldplace/"
thanks again
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Martin Weiss
Sent: Saturday, January 09, 2010 3:53 PM
To: [email protected]
Subject: st: RE: RE: RE: RE: RE: global macro for system directory?
<>
I cannot claim prescience, though. Pure coincidence, I am afraid :-)
HTH
Martin
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Hoffman, George
Sent: Samstag, 9. Januar 2010 22:44
To: [email protected]
Subject: st: RE: RE: RE: RE: global macro for system directory?
You pre-answered my subsequent question.
Amazing.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Martin Weiss
Sent: Saturday, January 09, 2010 3:38 PM
To: [email protected]
Subject: st: RE: RE: RE: global macro for system directory?
<>
You are more than welcome! I recommend you browse through
*************
help creturn, mark(directories)
*************
and pay close attention to the issue with -c(dirsep)-. Could save you
countless hours :-)
HTH
Martin
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Hoffman, George
Sent: Samstag, 9. Januar 2010 22:23
To: [email protected]
Subject: st: RE: RE: global macro for system directory?
Martin - thanks a bunch. I *knew* it had to be possible.
George
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Martin Weiss
Sent: Saturday, January 09, 2010 2:52 AM
To: [email protected]
Subject: st: RE: global macro for system directory?
<>
*******
di c(sysdir_stata)
*******
HTH
Martin
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Hoffman, George
Sent: Samstag, 9. Januar 2010 05:33
To: [email protected]
Subject: st: global macro for system directory?
I recently reinstalled stata 10 on my computer with a new os (windows 7). On
my old computer, I had installed in "c:\program files\stata". On the new
computer, it was in "c:\program files\stata10" by default. I had previously
written a bunch of ado and do files for data and log file manipulation that
referenced hardcoded directories under "c:\ptogram files\stata".
I know that the sysdir command will reveal the STATA directory to be the
install directory. Is there a way to retrieve that into a macro or tempvar
that I can then reference from a do or ado file?
Yes, it would all work fine if I just renamed my stata install dir - but I'd
rather not hardcode if possible.
Thanks,
George Hoffman
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/