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

st: RE: Data files and DOS (!) names


From   Joly.Patrick@ic.gc.ca
To   statalist@hsphsun2.harvard.edu
Subject   st: RE: Data files and DOS (!) names
Date   Tue, 1 Apr 2003 10:21:09 -0500

yesterday, I wrote
> Why is Stata now using DOS names rather the full names of 
> data files when
> one double-clicks on a .dta icon (Win2k)?

<snip>

> But now in Stata8, the same procedure results in
> 
>    running s:\ias\JOLYP\data\profile.do ...
> 
>    . use "P:\MYPROJEC\PROFITAB\PRESEN~1\GCR01I~1.DTA" 
>    (Global Comp Rep, 2.2: National Innovative Capacity, Table 1)
>    . save, replace
>    file P:\MYPROJEC\PROFITAB\PRESEN~1\GCR01I~1.DTA saved
>    . dir "P:\My Projects\Profitability\Presentations\"
>      <dir>   2/17/03 10:39  .                 
>      <dir>   2/17/03 10:39  ..                
>       7.1k   3/31/03 15:38  GCR01I~1.DTA      
> 
> The filename has been clobbered.

I found a solution to my own problem.  It is to add double-quotes around the
path to the Stata executable in the  Windows Explorer file association
settings, i.e. (not to be confused with e.g.) in Windows Explorer (Win2K) go
to

  o  Tools->Folder Options->File Types
  o  locate the .dta extension, highlight it
  o  click the 'advanced' button
  o  select 'open' under the 'actions' window and click on 'edit'

Under 'application used to perform action', the path to the executable
should be listed, followed some funny characters indicating the amount of
memory allocated to Stata and the -use "%1"- statement.  If the 

   <yourdrive>:\<yourpathname>\Stata8\wstata.exe /m1 use "%1"

is replaced by

   "<yourdrive>:\<yourpathname>\Stata8\wstata.exe" /m1 use "%1"

Stata will now open and -save, replace- using complete filenames.  I am not
sure why the quotes around the *pathname* does the trick (I would have
thought the quotes around the *filename* (%1) were more relevant) but it
works.  Perhaps, this could be the default when one restores file
association from within Stata (Prefs->Restore File Associations).


Patrick Joly
joly.patrick@ic.gc.ca
pat.joly@utoronto.ca
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index