[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: How to tell stata what directory I keep utility .do filesin?

From   Thomas Masterson <[email protected]>
To   [email protected]
Subject   Re: st: How to tell stata what directory I keep utility .do filesin?
Date   Mon, 07 Jan 2008 14:13:15 -0800

It is possible to do what Zachary wants with a combination
of global and local variables, like so:

global u C:\path\to\util\directory\
local kluge = "$u"+""
do "`kluge'"

You could set the global in your file, then repeat
the last two lines. But I agree that using ado files in your
adopath would be a better way to go.


Nick Cox wrote:
It would be possible to write a program that, with a key modification, looked along the adopath to find a .do file. The default directory would surely need to be the current directory.
But I think it would be a bad idea, as .do files are best kept in
directories or folders.
Nick [email protected]
Tom Trikalinos
for do-files you have to specify the complete path as in . do

programs saved as "ado" files can be called by their name if they are in
the adopath see _help adopath ++_

m-files in Matlab that contain callable routines correspond to ".ado"
files in Stata.

Zachary Harrison

I am interested in adding some folders to the path that Stata uses to find .do files. I have tried looking in the docs for adopath and sysdir but can't get those working for me. For Matlab users, I am after a command which accomplishes what the path() command does.
*   For searches and help try:
  Thomas Masterson
  Research Scholar
  Distribution of Income and Wealth Project
  Levy Economics Institute of Bard College
  Annandale-on-Hudson, NY  12504
  (845) 758-7715
*   For searches and help try:

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