How to Delete a File or Folder Showing Error “Access Is Denied”


Sometimes when you try to delete a file in Windows XP, you may receive the following error message:

Cannot delete <filename>: Access is denied. Make sure the disk is not full or write-protected and that the file is not currently in use.

Edit Steps

  1. 1

    Locate the file stored on your hard drive.

     

  2. Once the file is located, right-click on it and choose properties and remove(uncheck) all the attributes of the file or folder.
  3. 3

    Make a note of the file location.

  4. 4
    Open a Command Prompt Window.

    Open a Command Prompt Window.

    Open a Command Prompt Window. You can do this by Clicking on Start, Run, and type CMD and Press Enter.

  5. 5

    Leave the Command Prompt window open, but proceed to close all other open programs.

  6. 6
    Open the Windows Task Manager.

    Open the Windows Task Manager.

    Open the Windows Task Manager. You can do this in two ways :

    • Click on Start, Run and type TASKMGR.EXE and press Enter.
    • Press CTRL+ALT+DEL.
  7. 7

    Click on the Processes tab of the Windows Task Manager, click on the process named Explorer.exe and click on End Process and minimize Task Manager but leave it open.

  8. 8

    Go back to the Command Prompt Window and follow the Sub-Steps to delete a file or folder. You can follow the example below.

  9. 9
    Using DEL Command

    Using DEL Command

    To DELETE a FILE : Assuming that your “My Documents” folder contains a file called “myFile.exe” which needs to be deleted.Follow the steps given below :

    • In Command Prompt window you will find a path : C:\Documents and Settings\XYZ>(where XYZ is the name of User Account).
    • Execute the following command in Command Prompt window : cd My Documents(C:\Documents and Settings\XYZ>cd My Documents)
    • Now the path will be changed and it will look like : C:\Documents and Settings\XYZ\My Documents>
    • Now use the DEL command to delete the offending file in Command Prompt Window. Syntax : Type DEL <filename> (where <filename> is the file you wish to delete). Example:C:\Documents and Settings\XYZ\My Documents>del myFile.exe
  10. 10
    Using RMDIR Command

     Using RMDIR Command

    To DELETE a FOLDER : Assuming that your “My Documents” folder contains another folder called “New Folder” which needs to be deleted.Follow the steps given below :

    • In Command Prompt window you will find a path : C:\Documents and Settings\XYZ>(where XYZ is the name of User Account).
    • Now use the RMDIR /S /Q command to delete the offending folder in Command Prompt Window. Syntax : Type RMDIR /S /Q “” (where is the Location of folder you wish to delete). Example:C:\Documents and Settings\XYZ>rmdir /s /q “C:\Documents and Settings\XYZ\My Documents\New Folder”
  11. 11

    Use ALT+TAB to go back to Task Manager. In Task Manager, click File, New Task and enter EXPLORER.EXE to restart the Windows shell.

  12. 12

    Close the Task Manager. The file should now be deleted.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s