Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: st: couldn't start

From   Phil Clayton <>
Subject   Re: st: couldn't start
Date   Wed, 6 Apr 2011 08:55:23 +0930

Try removing the / from the end of your string, ie:
log using "/users/`c(username)'/documents/statalogs/$S_DATE.log/", append
log using "/users/`c(username)'/documents/statalogs/$S_DATE.log", append

The / is telling Stata that you're providing the name of a folder rather a file name, so it's trying to open a log file with no name (.log) in a non-existent folder ( 5 Apr 2011.log/). The space at the beginning of the $S_DATE may also be a problem.

If you anticipate generating lots of such logs it's worth considering naming them something more like log-2011-04-05 (ie with a yyyy-mm-dd format) - this way it's trivial to sort them in date order.


On 06/04/2011, at 8:41 AM, Daniel Marcelino wrote:

> Why Stata couldn't start my I'm getting the following
> error for the program below.
> file /users/DM/documents/statalogs/ 5 Apr 2011.log/.log could not be opened
> *!Version 0.1 - Daniel
> set mem 500m
> set matsize 1000
> set logtype text
> log using "/users/`c(username)'/documents/statalogs/$S_DATE.log/", append
> display "DateTime: $ S_DATE $ S_TIME"
> *
> *   For searches and help try:
> *
> *
> *

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index