Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: adding a filename extension


From   [email protected] (Alan Riley)
To   [email protected]
Subject   st: Re: adding a filename extension
Date   Tue, 11 Oct 2005 10:20:35 -0500

Kit Baum ([email protected]) responded to my post about filename extensions:
> I understand why Stata might use this algorithm, but if I had  
> designed it, I would not have done it that way... "looking forward  
> for a period" fails miserably on any of my files with names like  
> directors.tenure.proxy.sep2005.dta, which are perfectly legal under  
> *nix variants. Searching BACKWARD from the end of the filename would  
> be a much better way to determine whether there is a file extension.  
> (That does not preclude Stata making a mistake with a file  
> lacking .dta, but then it is the user's problem, not Stata's).

I misspoke yesterday when I said that Stata searches from the
beginning of the filename.  For the purposes of determining
whether a file has an extension, it does not matter whether the
search starts at the beginning of the filename or at the end.
If there is a period anywhere in the filename, Stata will assume
the file has an extension.  Thus, if a user types

    . use directors.tenure.proxy.sep2005

Stata will assume that the extension is "sep2005" and will not try
to add ".dta".


Alan
([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/



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