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

Re: Re: st: how to avoid absolute path names in do-files?


From   Eva Poen <[email protected]>
To   [email protected]
Subject   Re: Re: st: how to avoid absolute path names in do-files?
Date   Tue, 22 Mar 2005 14:12:16 +0100

> [email protected] schrieb am 22.03.2005 13:51:56:

> Do you really want to have absolute paths at all? If you are able to use
> only relative pathnames, there is no problem anymore. That means, if you're
> only using the directories 'project dir' and below, you can copy the whole
> directory tree without having to chance anything in your do-file.
> Example: say you have D:\projectdir\dir1 & D:\projectdir\dir2.
> If your do-file is in D:\projectdir\dir2 and you want to adress the
> directory "D:\projectdir" you could specify "../".
> If your do-file is in D:\projectdir\dir2 and you want to adress the
> directory "D:\projectdir\dir1 you could specify "../dir1/"
> etc. etc.

Thanks for this. It would indeed be the solution if I could be sure that
the directory structure would stay the same. But I cannot overlook what
data I am going to have in 3 months from now. It might be that what is
in "D:\projectdir\dir1" is moved to "D:\projectdir\anotherdir\dir1", for
example. In such a case I don't want to change all instances of ../dir1/
in all my do-files.

Thanks,
Eva Poen

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index