<>
Would the ".ado" suffix not appear twice, then, once from the members of the
-local- which are entered into "`x'" in the loop, and once from your manual
addition?
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Tharyan, Rajesh
Gesendet: Montag, 14. Dezember 2009 15:12
An: [email protected]
Betreff: st: RE: Check whether ado file is installed
How about this?
local required_ados " example1.ado example2.ado" //add the required ados
here//
foreach x of local required_ados {
capture findfile `x'.ado
if _rc==601 {
ssc install `x'
Hope this helps
Rajesh
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Jan Sauermann
Sent: 14 December 2009 01:05
To: [email protected]
Subject: st: Check whether ado file is installed
Dear Stata list,
I work on different computers and would Stata to automatically check
whether a number of ado-files is installed on a local machine. My idea
was to write something like
[a command which checks whether one ado-file is installed / or not]
if package!=installed {
ssc install package
}
My problem is basically to find a command which (1) checks whether an
ado file is installed and (2) gives me a local as return.
Best regards,
Jan
*
* 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/