Fred Wolfe <[email protected]> wrote:
> Does anyone know how to obtain in a macro in OS Windows Stata 8.1:
>
> 1) the path and file name of a currently open log file
> 2) the path and file name of a currently open command log file
You can get the path and filename of a currently open log file by using the
-log- command. The path and filename of a currently open command log file can
be obtained by using the -cmdlog- command. When these commands are issued with
no arguments, the path and filename are stored in the saved results.
. log
log: /home/srd/mylog.smcl, on
log type: smcl
. return list
macros:
r(type) : "smcl"
r(status) : "on"
r(filename) : "/home/srd/mylog.smcl"
. cmdlog
cmdlog: /home/srd/mycmdlog.txt, on
. return list
macros:
r(type) : "text"
r(status) : "on"
r(filename) : "/home/srd/mycmdlog.txt"
--Shannon Driver
[email protected]
*
* 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/