need help with rename-file/delete-file
> I have some very old LISP code that uses the delete-file and rename-file
> I have recently upgraded my version of CLISP, for the first time in
> several years (oops!).
> These 2 functions no longer seem to work the same way they used to.
> They are failing with messages that say they cannot operate because the
> file stream is still open. The failure does not seem to be consistent -
> they do consistently fail on the same files, but for some of my files
> they work and for other files fail, although as far as I know, these
> files were all opened and closed in the same manner.
Are these files still open? OPEN-STREAM-P for a stream tells you.
Maybe your Lisp implementation can list you all open streams
for a file (MCL for example has a variable *OPEN-FILE-STREAMS*)?
> Help! My program will no longer run, it keeps stopping at points where
> it needs to delete files or rename them.
Make sure all streams on your file are closed before you try to
delete the file. See also "WITH-OPEN-FILE".
Rainer Joswig, Hamburg, Germany