Delete a file or folder despite the access denied message

Author: Judy Howell
Date Of Creation: 25 July 2021
Update Date: 10 May 2024
Anonim
How to Delete a File or Folder Showing Error Access Is Denied
Video: How to Delete a File or Folder Showing Error Access Is Denied

Content

You may find that you are trying to delete a file and you get the following error: Can filename> do not delete: Access is denied "(or access denied).Check if the disk is full or write-protected or if the file is currently in use ". There are a number of different methods you can use to permanently delete such a file, but before going through all of these steps, it is important to make sure that the file you are trying to delete is not currently in use. If not, there are free third-party programs and simple command window tools that you can use to force the deletion of a file or folder.

To step

Method 1 of 3: Close open files

  1. Close all open programs. The most common cause of this error is a program that uses the file you are trying to delete. This is the case, for example, if you try to delete a document that is already open in Word, or a song that is playing.
  2. Open "Task Manager". Press Ctrl+Alt+Del and select "Task Manager" from the menu. Click on the "User" tab and find the entries for your username. Most of these programs can be stopped without crashing the system.
  3. Close the programs you recognize. You can do this by selecting them and clicking "End Process".
    • If you close a program that makes the system unstable, restart your computer to restore it.
  4. Restart your computer. Often times, restarting your computer will cause the link between a specific program and file to no longer exist. Try to delete the file after the computer has finished restarting and before starting any other programs. If the file still gives the same error, move on to the next method.

Method 2 of 3: Using special software

  1. Look for a program to manage processes. Popular options include Process Explorer, LockHunter and Unlocker or Lock-UnMatic and Mac OS File Unlocker for the Mac. All these programs are free and integrate into your Windows interface. If you choose to use Unlocker, be careful navigating their website as there are several insidious advertisements that could lead you to get malware on your computer.
  2. Install the program. All of these programs are fairly easy to install. Extract the file if necessary and open the Setup or Install file. The default installation settings will work for most users.
    • Some programs may attempt to install browser toolbars during installation. Make sure you deselect this if you don't want any new toolbars.
  3. Right-click on the file you want to delete. Select the newly installed tool from the menu. This will open a new window. A list of all programs currently using the file is displayed.
  4. End the programs. Select the program you want to quit and click the "Kill Process" button. When all blocking programs are finally closed, you will be able to delete the file without further problems.

Method 3 of 3: Using the command prompt

  1. Find the file stored on your hard drive. If you cannot find the file, use the search function. Click on the "Start menu" and type the file name in the search field. In Windows 8, you can start typing the file name when you are in the Start window.
  2. Right-click on the file and select "Properties". Remove (by checking) all attributes from the file or folder.
  3. Make a note of the file location. You will have to put this elsewhere when you force remove it via Command Prompt.
  4. Open a command window. Do this by clicking Start and typing "cmd" in the search field, without the quotes.
  5. Close all open programs. Leave the command window open, but otherwise close all other open programs.
  6. Open Task Manager. You can do this by pressing Ctrl+Alt+Del and selecting "Task Manager" from the menu, or by going to the Start menu, pressing "Run", and then entering "TASKMGR.EXE".
  7. Click the "Processes" tab in the Task Manager window. Find the process called "explorer.exe". Select it and click "End Process". Minimize, but does not close Task Manager.
  8. Return to the command window. Here you can force the deletion of a file or folder, using simple commands. While files and folders can be deleted in much the same way, there are subtle differences in the command you will use.
  9. Find the path: C: Documents and Settings Your username>. You can see this at the prompt in the command window.
  10. Run the command. In the command window, enter cd My documents after your username.
  11. Delete your file. After "My Documents", enter the Delete command followed by the name of the file you want to delete. For example, "del unwanted file.exe".
  12. Use the DEL command to delete the recalcitrant file from the command window. The whole command should now look like this: C: Documents and Settings Your username My Documents> del unwantedfile.exe
  13. Delete a folder. If you want to delete a directory instead of a file, use the command "RMDIR / S / Q" instead of the "del" command. This will look something like this: C: Documents and Settings Your username> rmdir / s / q "C: Documents and Settings Your username My Documents Junk Folder"
  14. Press ALT + TAB. This will take you back to Task Manager where you are on File > New Task Click and then enter "EXPLORER.EXE" to restart the Windows interface.
  15. Close Task Manager. The file should now be deleted, but you can check it by searching for it from the Start menu and entering the term in the search bar.

Tips

  • For more information about DOS commands, type HELP at the prompt in the command window, or search online.
  • To return to the previous directory in the command window, you can use the following command:
    CD.'.

Warnings

  • This trick will not work if the file you want to delete is in use by another program. Just like an MP3 file that is playing while you want to delete it. In this case, close the media player that is playing the file, then delete it.
  • Do not stop any process except "EXPLORER.EXE". Doing so can have unwanted consequences including data loss, system instability, and crashing or corruption of the operating system.