How to delete a file or folder that gives an "Access Is Denied" error

Author: Carl Weaver
Date Of Creation: 21 February 2021
Update Date: 2 July 2024
Anonim
PhpMyAdmin Error Warning in .librariesclassesConfigFormDisplay.php#
Video: PhpMyAdmin Error Warning in .librariesclassesConfigFormDisplay.php#

Content

This has happened to all of us during hard drive cleaning or virus removal. And so, you have fun deleting unnecessary files and Bam:’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.Now what? It seems that you are stuck with this file, but just follow these instructions and you will get rid of the file in a few minutes.

Steps

Method 1 of 3: Closing Open Issues

  1. 1 Close all open programs. The most common cause of this error is a program using the file you are trying to delete. For example, if you are trying to delete a document that is open in Word, or trying to delete a song that is currently playing.
    • Close all open programs and try deleting the file again.
    • Close any file sharing programs. Many of these programs transfer files in an invisible manner. If the program tries to transfer the file that you are deleting, you will receive an error message.
  2. 2 Open Task Manager. Press Ctrl + Alt + Del and select Task Manager from the menu. Click on the Users tab and find the entries under your username. Most of these programs can be closed without damaging the system.
    • Close the ones you recognize by selecting them and clicking End Process.
    • If you close a program causing the system to become unstable, restart your computer to cancel ..
  3. 3 Reboot your computer. Often, restarting your computer will release a particular file from the program holding it down. Try deleting the file after rebooting and before starting any other programs.

Method 2 of 3: Launching Third-Party Programs

  1. 1 Find a process unlock program. Popular options include Unlocker and WhoLockMe. Both of these programs are free and integrate into your Windows interface.
    • Both programs have relatively simple installations. Unzip the file if necessary and open the Setup or Install file. Typical installation options will work for most users.
    • Some programs may try to install browser toolbars during installation. If you do not want to install new toolbars, then deselect.
  2. 2 Right click on the file you want to delete. Select the newly installed tool from the menu. A new window will open. A list of all programs that currently have access to the file will open.
  3. 3 Close programs. Select the program you want to close and click on the Kill Process button. When all blocking programs are closed, you can delete the file without any problems.

Method 3 of 3: Using the command line

  1. 1 Open the location of the file on your hard drive.
    • If you can't find the file, try using the Search function. Click on the Start menu and enter a file name in the Search box. In Windows 8, start typing the file name when the Start screen opens.
  2. 2 Right click on the file and select Properties. Remove (uncheck) all attributes of the file or folder.
  3. 3 Make a note of the location of the file.
  4. 4 Open a Command Prompt window. You can do this by clicking on Start and typing “cmd” in the Search box.
  5. 5 Close all open programs. Leave the Command Prompt window open, but close all other open programs.
  6. 6 Open Task Manager. Press Ctrl + Alt + Del and select Task Manager from the menu.
  7. 7 Click on the Processes tab in the Task Manager. Find the process called “explorer.exe”. Select it and click End Process. Fold down Task Manager, but leave it open.
  8. 8 Return to the Command Prompt window. Follow the example below to delete the file named “myFile.exe,” located in My Documents.

In the Command Prompt window, you will find the path:C: Documents and Settings XYZ> (where XYZ is the user account name). Run the following command in the Command Prompt window: cd My Documents (C: Documents and Settings XYZ> cd My Documents) Now the path will change to look like:C: Documents and Settings XYZ My Documents> Use the DEL command to delete the interfering file in the Command Prompt window.Syntax: Type DEL filename> (where filename> is the file you want to delete).Example: C: Documents and Settings XYZ My Documents> del myFile.exe


  1. 1 Delete the folder. Follow the example below to delete a folder called “New Folder” located in the My Documents directory.

In the Command Prompt, open the path:C: Documents and Settings XYZ> (where XYZ is the user account name). Now use the RMDIR / S / Q command to remove the interfering folder in the Command Prompt window.Syntax: Type RMDIR / S / Q "path>" (where path> is the location of the folder you want to delete).Example: C: Documents and Settings XYZ> rmdir / s / q "C: Documents and Settings XYZ My Documents New Folder"

  1. 1 Use ALT + TAB to return to the Task Manager. In Task Manager, click on File, select New challenge and enter EXPLORER.EXE to restart the Windows interface.
  2. 2 Close Task Manager. The file should now be deleted.

Tips

  • For more information on DOS commands, type HELP at the Command Prompt or you can search the Internet.
  • If you want to change your Hard Disk on the Command Prompt, use the following command:
    Syntax: Drive Letter>:
    Example: C: Documents and Settings XYZ> D:
    D: >
  • To return to the previous directory on the Command Prompt, you can use the following command:
    CD ..

Warnings

  • Do not forget to execute New task "EXPLORER.EXE" in Task Manager.

  • This trick will not work if the file being deleted is in use by another program. As an mp3 file that is playing but you want to delete it. In this case, close the player and then uninstall.
  • Do not terminate any other process other than "EXPLORER.EXE". This can lead to undesirable results, including data loss, system instability and operating system crash, or damage.