Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: RE: using current_ time to manage the log file


From   "G. Dai" <[email protected]>
To   [email protected]
Subject   Re: st: RE: using current_ time to manage the log file
Date   Wed, 7 Jul 2010 10:40:16 -0700

thanks. It is just for organizing the research. To know the data, I
always run any times of regression, each with minor revision. Without
the time as the log name,
I either rewrite the log file or rename the log file every time I try
a new revision.

On Wed, Jul 7, 2010 at 10:27 AM, Martin Weiss <[email protected]> wrote:
>
> <>
>
> *************
> loc name=subinstr("`c(current_time)'_`c(current_date)'.smcl", ":","",.)
> loc name=subinstr("`name'", " ","",.)
>
> cap log close
> log using `name', replace
> di in r "`r(filename)'"
> *************
>
>
> Why does it need to be the filename? Just insert the date somewhere in the
> body of the -log-.
>
>
> HTH
> Martin
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of G. Dai
> Sent: Mittwoch, 7. Juli 2010 19:15
> To: [email protected]
> Subject: st: using current_ time to manage the log file
>
> hi all,
> I find it is difficult to trace back my research by looking at the log
> files. Ideally, I'd like to name the
> log file with the time the do file executes, e.g., the log file is
> named as "10_25_7_July_2010" where 10_25 is the
> time and 7_July is the date.
> with this in mind, I'd like to  use
> ***************begin ******
> log using "/.............../"`c(current_time)'_`c(current_date)'.smcl",
> replace;
> **********end********
> but failed because current_time have punctuation marks like ":" which
> can't be included in a file name.
>
> how you guys solve this problem?
> thanks,
> Guang
> *
> *   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/
>
> *
> *   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/
>

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index