MacLochlainns Weblog

Michael McLaughlin's Technical Blog

Site Admin

Delete an Access Denied File

with 7 comments

When my old Toshiba Tecra died because of a fried mother board, I salvaged my hard disk. I snagged a 2.5″ USB hard disk case but didn’t have time to clean it up. While cleaning up the old Windows XP files tonight, I ran into the following error:

E:\WINDOWS\Temp\hsperfdata_SYSTEM>attrib +R *.*
Access denied - E:\WINDOWS\Temp\hsperfdata_SYSTEM\2792

I thought the attrib utility might help me fix the error but it didn’t. I checked the file Property dialog for a quick fix and didn’t find one.

A little poking around on the web and I decided that disabling simple file sharing may provide additional options. You disable it by navigating to Start, My Computer, where you click on the Tools option in the menu and chose the Folder Options … to get the following dialog box. You clicked the View tab. In the tab, you scroll down in the Advanced setttings section until you see the Use simple file sharing (Recommened) option. You click the check box to turn off simple file sharing. Click the Apply button to make the change.

folderoptions

Open a separate Explorer session, and navigate to the directory where you’ve encountered a file that denies you access to delete it. Right click on the file. You should see two tabs, one labeled General and the other Security. If you see only the General tab, you may have forgot to check the Apply button earlier.

2792_properties2

Click the Security tab to see the following dialog. Click the Allow check box in the Permissions for Everyone section and then click the Apply button. You should now be able to delete the file in Windows Explorer.

Written by maclochlainn

January 27th, 2009 at 12:21 am

Posted in Microsoft XP