FileDelete and Access Denied Error
Keywords: filedelete
Question:
Had a problem with FileDelete(). I couldn't get FileDelete() to work. Tried instead Run DOS command.com to delete this file. This didn't work either.This problem occurred on my home machine (no network) and is about a simple as they come. I gave up and shut down all programs and then simply tried to delete the file from Norton FIle manager... got "access denied" when trying to delete. Ouch!
Rebooted machine and FileDelete() then worked. I suspect there's something wrong in Win95 that's causing this, though I don't know what. I have had similar problems with "access denied" in other circumstances.
Answer:
Sounds like something opened the file and did not close it. (or still had it open)If you FileOpen with WinBatch and forget to FileClose it, we catch the error and automagically close the file for you.
If some process has a file open and you "End Task" the process, it might not be able to close its files and you will get an access denied until reboot.
Some programs have bugs and they forget to close their files. So the thing to find out is what is "common" about all these files.
Article ID: W12973Filename: FileDelete and Access Denied.txt