Statalist


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

st: RE: Stata thinks files are read-only when they shouldn't be!


From   "Kieran McCaul" <Kieran.McCaul@uwa.edu.au>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Stata thinks files are read-only when they shouldn't be!
Date   Mon, 11 May 2009 05:43:09 +0800

..


I used to have problems likes this many years ago.  I would have been
using Windows XP or Windows 2000 in those days.
As I recall, whenever I copied files from a CD or DVD onto my disk drive
they would come across as read-only and, I think, if I copied a whole
folder of files across, the folder itself was also marked as read-only.
So that meant I couldn't write to the folder on disk.


______________________________________________
Kieran McCaul MPH PhD
WA Centre for Health & Ageing (M573)
University of Western Australia
Level 6, Ainslie House
48 Murray St
Perth 6000
Phone: (08) 9224-2701
Fax: (08) 9224 8009
email: Kieran.McCaul@uwa.edu.au
http://myprofile.cos.com/mccaul 
http://www.researcherid.com/rid/B-8751-2008
______________________________________________
Epidemiology is so beautiful and provides such an important perspective
on human life and death, 
but an incredible amount of rubbish is published.  Richard Peto (2007) 

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of kokootchke
Sent: Saturday, 9 May 2009 11:53 AM
To: statalist
Subject: st: Stata thinks files are read-only when they shouldn't be!


Dear all, 
Sometimes when I run do files in which I try to save, replace or modify
a file in some way, Stata thinks that this file is read-only when it
shouldn't be. 
The problem I'm having right now is the following:
I am running a do file that contains a bunch of lines like:


foreach y of varlist happ job{ 
	regress `y' lrwage lrwager firm_l if female==1, cluster(unm)
estimates store Self0
	regress `y' lrwage lrwager firm_l firm_iqr if female==1,
cluster(unm)	estimates store Self1
        ...
        outreg2 lrwage lrwager firm_l firm_iqr [Self0 Self1 ...] using
myfile_`y', replace bdec(2) label nocons excel}


When I do the file, I notice that Stata shows in the display window the
results for all the regressions but when it reaches the outreg2 command,
it gives the following error:

file myfile_happ.txt is read-only; cannot be modified or erasedr(608);

And I get this error whether myfile_happ.txt exists in the directory or
not. Also, sometimes I only get this error for the SECOND time Stata
goes through the loop; that is, the first time it goes through and it
does save the file myfile_happ.txt but the second time it stops and it
fails to save the file myfile_job.txt!!! What do you think is going on??

Another thing that happens often -- but I'm not having this problem
right now -- is that I run a do file that contains a line such as:
save, replace
and it fails to save the file because it is apparently read-only. What
is even stranger is that some other times, it does go through and saves
the file normally. 
I have already verified that my folder where my files are in Windows is
not read-only, but that doesn't help.
I am running Stata 9 SE on Windows XP Pro... but I think I have also
seen this error when I've run my code on a different computer with Stata
10 SE.

Thank you very much!!!
Adrian




_________________________________________________________________
Windows Live(tm): Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index