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   "Dan Weitzenfeld" <[email protected]>
To   [email protected]
Subject   Re: st: how to run do files in two computers, one with Windows XP, another with Vista
Date   Tue, 3 Jun 2008 14:30:09 -0700

I've been looking for a way to do this as well.  Unfortunately, c(os)
can't distinguish between XP and Vista.


"
    c(os) returns a string containing "Windows", "Unix", or "MacOSX",
depending on the operating system that you are using.  The list of
alternatives,
        although complete as of the date of this writing, may not be complete.
"

The best way may be to use a capture-if, along the lines of:



capture cd "C:\documents and settings\adrian\my documents\research\"
if _rc!=0 {
            cd "[windows vista research path]"
}



On Tue, Jun 3, 2008 at 2:15 PM, Adrian de la Garza
<[email protected]> wrote:
>
> Hello everyone!
>
> 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?
>
> Thank you!!
>
> Adrian
>
> _________________________________________________________________
> It's easy to add contacts from Facebook and other social sites through Windows Live™ Messenger. Learn how.
> https://www.invite2messenger.net/im/?source=TXT_EML_WLH_LearnHow
> *
> *   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/
>

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