I agree with Nick Cox, all what we can present to you here is the
solution each one of us found to be best working for him-/herself.
Personally, I make sure that apart from some kind of master path the
following directory structure is the same on all computer systems
where I want my dofiles to be able to run. All dofiles called from the
master-dofile then use relative references for the directories.
Hope this helps,
sebastian
On 10/28/05, Nick Winter <[email protected]> wrote:
> My routine -c- (available from SSC as -fastcd-) might help here.
>
> It allows you to associate brief mnemonics with directory paths, and
> then navigate the paths with the mnemonics. I developed it for
> precisely this reason: the mnemonic "myproj" can point to a network
> directly at work and to some other directly at home; the line "c
> myproj" in a do file will then switch to the relevant directory for
> the current system.
>
> Best,
> Nick Winter
>
> At 01:12 PM 10/28/2005, you wrote:
> >I doubt that there's a single best
> >way to do this. If this were my
> >problem, I might want all the
> >directory references to be
> >in a master.do file and
> >do most changing around by means of -cd-:
> >
> >============================ master.do
> >...
> >cd directory_one
> >do directory_one
> >cd ..\directory_two
> >do directory_two
> >...
> >============================
> >
> >If this is possible then your colleague
> >just needs to edit master.do.
> >
> >But it could be even easier to agree on
> >a common directory structure and naming.
> >
> >Nevertheless this could be far from optimal
> >for you, especially if you need to use
> >files in different directories more or
> >less at the same time.
> >
> >Nick
> >[email protected]
> >
> >[email protected]
> >
> > > I have a number of subroutines that I want to be able to run
> > > from a master file
> > > and also send to someone else who has a different file
> > > structure than myself.
> > > What I tried to do was this:
> > >
> > > *************************
> > > global do_dir "C:\Project\Do Files"
> > > global data_dir "C:\Project\Data"
> > > global log_dir "C:\Project\Log Files"
> > > global output_dir "C:\Project\Output"
> > >
> > > do Subroutine1
> > > do Subroutine2
> > > do Subroutine3
> > >
> > > macro drop do_dir
> > > macro drop data_dir
> > > macro drop output_dir
> > > ************************
> > >
> > > There are parts of each subroutine that refer to each
> > > directory and I just want
> > > to reference them in this file, so the person that I'm
> > > working with just has to
> > > cut and paste once for each directory when I send it to them.
> > >
> > > Is there a better way to do this??
> > >
> >
> >*
> >* 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/
>
> ________________________________________________________
> Nicholas J. G. Winter 607.255.8819 t
> Assistant Professor 607.255.4530 f
> Department of Government [email protected] e
> Cornell University falcon.arts.cornell.edu/nw53 w
> 308 White Hall
> Ithaca, NY 14853-4601
>
>
> *
> * 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/
>
--
- Seb F Buechte
-
- Stay tuned!
*
* 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/