Re: Closing a file
Re: Closing a file
- Subject: Re: Closing a file
- From: Frank Miedreich <email@hidden>
- Date: Wed, 22 Aug 2001 10:39:46 +0200
At 23:36 Uhr -0400 21.08.2001, Matthew Fischer wrote:
After opening a file for access with write permission, then closing
access I tried to move the file to the trash and empty the trash.
However I got an error message saying that the file could not be
deleted because it was in use. Doesn't closing access make it not in
use anymore (the file was a simple text file and was not in use by
any application)?
Hi,
it should close the file. I have the same problem quite often
however, and never been able to figure out what causes a file to be
not closed.
What you definitely should do is
set f to open for access file "whatever"
...
close access f
not: close access file "whatever"
also make sure that you don't actually leave your script before the
close access line, e.g. through some try/error mechanism.
If you find out how to close a file that was accidentally left open,
drop me a line. I have never been able to figure out whether that is
possible.
cheers, Frank
--
Frank Miedreich
Mozquito Technologies AG
Check out our new Website at
http://www.mozquito.com/