Statalist The Stata Listserver


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

st: Querying Stata on what kind of machine it is running


From   Marco Petracco Giudici <mpguk@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   st: Querying Stata on what kind of machine it is running
Date   Mon, 28 Aug 2006 12:22:25 +0100

Hello everybody,

I have been searching the manual and the net for a while, but could not find an answer to what should be an "easy" question. I have a Mac laptop and a Windows desktop, both of them with stata installed. I am writing .do files and would like to make them send their output to a certain directory/folder using the "cd" "use" and "save" commands.
However the syntax of the "cd" and other commands is different in Stata for Mac and Stata for Windows (the way of specifying the path is different under the two OSs)
The question then is: is there a way of querying on what machine stata is running in order to execute the command with the appropriate syntax?
In other words, I would like to write a bit of code to do something like

" Discover on which machine stata is running "
" if running on a Mac execute cd command with mac syntax "
" else if running on a winxp machine execute cd command with winxp syntax "

grateful for any help,

best regards,

Marco
--
Marco Petracco Giudici
PhD program in Economics and Organization
University of Venice


___________________________________________________________ Try the all-new Yahoo! Mail. "The New Version is radically easier to use" The Wall Street Journal http://uk.docs.yahoo.com/nowyoucan.html
*
* 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