Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

AW: st: truncate folder path in Stata 7?


From   Dietrich Drüner <dietrich.druener@web.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   AW: st: truncate folder path in Stata 7?
Date   Fri, 12 Dec 2003 10:40:40 +0100

Dear Uli,

thanks a lot, it works! The only strange thing is, that I have to copy
identical profil.do files into all folders where I want to run do files
referring to profile. Stata does not search for it along the path as
described in -help profile.

Best regards,

Dietrich.

PS
Dear Michael Blasnik, as far as I could find out, you can only use relative
paths skipping the lower levels if you never use more than 8 characters.
Unfortunately, this is generally the case with Win XP.

____________________________________________________________________________
_____________________

Ulrich Kohler wrote:

How about defining global makros in profile.do (see -help profile) or in
project master files. For example your profile.do might read like this

---------------------profile.do
global ourprojectdata "m:/workgroup/datasets/ourprojectdata"
global ourproject "c:/My Files/projects/ourproject"
----------------------------------

and profile.do on your collegues machine might read like this:

---------------------profile.do
global ourprojectdata "/home/collegue/datasets/projects"
global ourproject "/home/collegue/ourproject"
----------------------------------

Then you can run Do-Files on both machines which contains commands like
this:

. cd "$ourproject"
. use "$ourprojectdata/maindata"
. log using "$ourproject/an1", replace
. scatter varlist, saving("$ourproject/graphs/mygraph, replace)

many regards
uli

--
kohler@wz-berlin.de
+49 (030) 25491-361


-----Ursprüngliche Nachricht-----
Von: statalist-owner@hsphsun2.harvard.edu
[mailto:statalist-owner@hsphsun2.harvard.edu]Im Auftrag von Ulrich
Kohler
Gesendet: Mittwoch, 10. Dezember 2003 09:39
An: statalist@hsphsun2.harvard.edu
Betreff: Re: st: truncate folder path in Stata 7?

Dietrich Drüner wrote:
> how can I truncate the first levels of the folder path where I want to
load
> or save datasets in Stata 7 (for Windows)?
>
> I am using Stata on two different computers with a very similar folder
> structure. It looks about like: "...\MyFiles\Dissertation\dataanalysis\.."
> but the first three or four path levels are different due to the folder
> structure of the operating system.
>
> I remember that in an older version (4 or 5) of Stata there was a simple
> command that made Stata search for the appropriate path. But I can't find
> anything in the help files or at stata.com.
>
> It's always a dull work to change all do-files that I have saved on the
> other computer when I want to use them on the second.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Dietrich Drüner
Schneckenburgstr. 24
D - 78467 Konstanz

Tel. (+49) - 7531 - 698003
Fax (+49) - 1212 - 522970813
Mob.(Inland): (+49) - 177 - 6334099
Mob.(Ausland):(+49) - 162 - 7679952

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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