"(1) your computer/OS is capriciously setting your file with a read-only
attribute (as Nick points out, this can happen with Windows XP) or (2)
when Stata tells the OS to write the file to myfile_happ.txt, the OS is
moving too slowly, Stata moves on to the next loop and tries to write
again, but the file is read- only because it is still being written to
by the OS (or BOTH (1) and (2) are happening)."

I had a similar experience a few weeks ago, and the problem was akin to
#2. I use Windows Live Sync (WLS), which maintains file synchronization
on multiple computers. In one instance, I was getting errors because
Stata was writing a file and then trying to overwrite the file faster
than WLS could lock, copy, and unlock it. I wonder if Amadou is having
problems for similar reasons (some sort of file sharing program).

Michael
Eric A. Booth wrote:

I've had success with setting the file/folder permissions using the
command line.

Hi,
Many thanks for your answer. I have put a cd "" on the top of the do
file before running the code, so basically, I shouldn't have the
problem. The folder I am saving is a sub directory in "My Documents",
that is "My Documents/Data".
But when I right-clik on the Data folder to check its properties, I
see that folder is read-only. I remove the read-only button check and
re-run the stata code, but when I check again later the folder turns
back to "read-only". Very frustrating !!!
I am the owner of the laptop. I have administrator rights, so I do not
know what to do else.
Thanks for your time.
Amadou.
2009/6/22, Zurab Sajaia <zsajaia@hotmail.com>:

Hi Amadou,

If the folder where you're trying to save files (any files, xml_tab
output,
log, datasets etc) is write protected then of course that can
explain error
603, Stata needs to be able to save on that location. are you
specifiying

the full path in the save() or -using- options? if you just write

save(results.xml) that means that you want to save in the current
working
folder, which most of the cases is Stata folder (c:\program
files\stata10\

or something like that) and most probably protected by your system
administrator.
Try puting a path, which you are sure you have access to, like your "my
documents" folder and see if you get the same problem.
Without having more info about your setup I can't think of any other
suggestion.
Best,
Zurab

log using.
From: stata.diallo@gmail.com
To: statalist@hsphsun2.harvard.edu
Hi,
I am using two computers with no usb or alike so I cannot show what is
going on.
I am trying to output tabulations and regression results in a single
excel file. I am using xml_tab. Each set of results is saved in a
separate sheet. The first option of xml_tab is "replace" followed by
a set of "append" commands. However, After a few runs, stata issues an
error message:
file can not be saved at this location
r(603);
I try to unprotect the folder (removed the "read-only" check) but it
still coming back to read only. Is that the problem? I have the same
problem when I try to save in a log file.
Best regards.
Amadou.
---
Amadou B. DIALLO, PHD
Development Economist
Director, Center for Research and Training on Adult Education
Mayotte, FRANCE
www.aprosasoma.org
+262639693250
*
* 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/