Statalist


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

Re: st: how to run do files in two computers, one with Windows XP, another with Vista


From   [email protected] (James Hassell, StataCorp LP)
To   [email protected]
Subject   Re: st: how to run do files in two computers, one with Windows XP, another with Vista
Date   Tue, 03 Jun 2008 17:48:04 -0500

Adrian could use the extended macro function -env- to
get the information from the operating system's environment variables. 

For example:

. local homepath : env HOMEPATH
. local homedrive : env HOMEDRIVE
. local mypath `homedrive'`homepath'
. display `"`mypath'"'

To determine what environment variables are available, open a command
prompt in Windows, and type -set-.

Hope this helps.

-- James
[email protected]


> Quick question regarding running do files in two separate computers.  
> My old laptop and my desktop both have Windows XP and I've been  
> running my do files with lines with the following contents:
>
> cd "C:\documents and settings\adrian\my documents\research\"
>
> and I've never had any problems. Now I have a new laptop with  
> Windows Vista and the directory where My Documents are saved no  
> longer comes after "documents and settings"...
>
> what can I do in this case? Do I need to change all of my do files  
> or is there an easier fix?
>
> Adrian

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