Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Identify computer on which Stata is running


From   Stefan Pichler <[email protected]>
To   Statalist <[email protected]>
Subject   st: Identify computer on which Stata is running
Date   Thu, 17 Oct 2013 09:51:41 +0200

Dear Statalisters,

I am running Stata on different PC's. Is there a way that Stata knows from which PC it is running and changes the directory accordingly. To be more specific I would like to to the following:

if currentPC==PC1 {
cd "C:\Users\a123"
}
if currentPC==PC2 {
cd "C:\Users\b456"
}
if currentPC==PC3 {
cd "C:\Users\c789"
}
...


where Stata should find out which PC I am using and set the right directory.

Any advice would be greatly appreciated.

Stefan 		 	   		  
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index