Statalist


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

Re: st: Using do files in Windows 7 and XP


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: Using do files in Windows 7 and XP
Date   Fri, 18 Dec 2009 08:12:19 +0000 (GMT)

--- On Fri, 18/12/09, kokootchke <[email protected]> wrote:
> I have always had all of my do files in my desktop, which
> runs Windows XP. The do files make lots of references to
> folders such as "C:\Documents and Settings\Adrian\My
> Documents\research". Now, I just bought a laptop that runs
> Windows 7. How can I use those files on my new computer (the
> laptop)? I thought I could manually create a folder called
> "Documents and Settings\Adrian\My Documents\research" but
> that seemed like a "brute-force" solution. Any ideas?

one thing you could do is :
1) download Ulrich Kohler's -dirtools- (ssc install dirtools-)
2) use -ldo- from this package to get a list of do-files in 
   your directory
3) use -filefilter- to replace the string representing your 
   old path with a string representing the new path.

To avoid this same problem you can make a do-file called
home.do, whose only task is to define a global called $home
which points to your home directory. Your other .do-files
can than start with the line -do home.do- followed by the
line -cd $home-. So the next time you change computers,
all you have to change is the home.do file.

This way you can also organize your work in different folders 
for each separate project, and have separate home.do files 
for each project. If you also like your files on your 
desktop, you can put links on your desktop to the .do files 
you are currently working on.

Hope this helps,
Maarten 

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen  
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

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



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index