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

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


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

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

and Alan Riley (ariley@stata.com) replied

> What Patrick is reporting appears to be controlled by Windows rather
> than Stata.  Like Patrick, I work on a Win2k machine, but when I
> double-click on a long filename in a long path, the filename passed
> to Stata by Windows is NOT the DOS-compatible one that 
> Patrick is seeing,
> What I get is the long file name that Patrick would like to see.  We
> have seen this same preferred behavior on other computers with other
> variants of Windows such as XP in tests this morning.
> 
> As of right now, I don't have an answer for Patrick about the behavior
> he is seeing.  We will continue to look at the issue to try 
> to reproduce
> it here and to provide instructions to tell Windows not to pass
> old-style DOS-compatible filenames to Stata.
> 
<snip>
>
> It is important to note about the -use- command that Stata has no
> control over what Windows substitutes in places of the "%1".  On my
> computer, I am seeing Windows substitute
> 
>    C:\My Projects\Profitability\Presentations\GCR01Innov_cap.DTA
> 
> for the %1.  (I created a path and file on my Windows 2000 machine
> to simulate Patrick's path and file.)
> 
> Patrick is seeing Windows substitute
> 
>    P:\MYPROJEC\PROFITAB\PRESEN~1\GCR01I~1.DTA
> 
> for the %1, which is unfortunate.
> 
> I note that the drive on which GCR01Innov_cap.DTA is stored for
> Patrick is labelled with the letter "P", which is an indication
> that it is probably a network drive.  This is the major difference
> I can see between the experiment I set up on my computer and
> Patrick's setup.  I am curious as to whether this might be a clue
> to the reason why Windows is choosing to pass a DOS-style filename
> to Stata rather than the real full Windows filename.
> 

yes, P:\ is a network drive.  I move the file to the C:\ drive, I still get 

   use "C:\MYPROJ~1\PROFIT~1\PRESEN~1\GCR01I~1.DTA"

> I suspect that if this is not related to a network drive, that there
> may be some obscure Windows setting which may be controlling this
> behavior.  We have done some research, but have not been able to
> find any information on such a setting.  I invite anyone who may be
> experiencing similar behavior to Patrick to email me, and I also would
> like to hear from anyone who might have a guess as to what is causing
> this behavior on Patrick's computer.

Thanks Alan for the detailed reply.  You were probably in the middle of
writing your email by the time my earlier message reached the list.  In that
email I mentioned I had found that inserting double-quotes around the
pathname to the executable solved the problem, as in

   "c:\stata\wstata.exe" /m1 use "%1"

Stata now opens data files using complete names and not abbreviated DOS
name.

AFAIK, this solutions serves my purpose.  From your end however, you might
be just as puzzled by this kludge than by the original problem itself and on
this issue I am afraid I can't be of any assistance.  What I am wondering
though is: does the Stata interface have control over the actual value of

	c:\stata\wstata.exe /m1 use "%1"

that gets entered into the Windows Registry?  If yes, perhaps you could
modify the executable so that quotes around the path to the executable get
inserted when a user restores the file associations from within Stata (and
when Stata is installed).

I would also like to note that whatever solution you decide to go with (if
any), the same should probably be done to associations for .gph and .do
files.  Thanks again.


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