Jump to content


Photo

File Cannot Be Deleted: Access Denied


  • Please log in to reply
No replies to this topic

#1 Drackir

Drackir

    Admin/Project Leader

  • Admin
  • PipPipPipPip
  • 1,519 posts
  • Gender:Male
  • Location:Canada

Posted 08 August 2006 - 12:55 AM

So here's my story. I'm not going to bother explaining why, but I had this file on my C drive at the path "C:\Windows.0\system32\Macromed\Flash\" called "flash.ocx" I tried EVERYTHING to get this damn file to delete. Of course the delete key was my first attempt. Then killbox. Then safe-mode. Then safe-mode command line. Then I tried deleting it using a Live Windows XP CD (runs Windows XP from a cdrom instead of Hard Drive) which STILL didn't work.

Finally, after much fiddling around in the command prompt, I found the amazing /F flag for the "del" (delete) command.
The DOS help command says that the /F flag "Force[s] deleting of read-only files."
The syntax is: del filename /F
And that's what did it for me. If you ever come across a strange situation like this try this out and see if it works.

Note: I also used a command called CALCS to set some access control list information (I reset the ACLs to make my user have F(ull) privileges). For info on this use "help cacls" in the command prompt. The text to change permissions is: "cacls filename.ext /G YourUser:F" Where YourUser is the name of your windows login (ie. Administrator, Billy, etc.)

Hope this helps someone!
~Drackir




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users