3 ways to delete a file or folder that shows the error "Access Denied"

Table of contents:

3 ways to delete a file or folder that shows the error "Access Denied"
3 ways to delete a file or folder that shows the error "Access Denied"
Anonim

An error that appears on the computers of everyone who tries to clean their hard drive or remove a virus is: Can't delete (your file): Access denied. ' Make sure the disk is not full or write-protected and that the file is not in use at this time. ' There are a few different methods that you can employ to permanently delete this file, but before you go through all the steps, it is important that you make sure that the file you are trying to delete is not actually in use. If this is not the case, there are free third-party applications and simple command line tools that you can use to forcibly delete a file or folder.

Steps

Method 1 of 3: Close open tasks

'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 1
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 1

Step 1. Close all the programs that you have open

This error generally appears because a program has access to the file you are about to delete. For example, if you try to delete a document that you have open in Word or a song that you listen to, an error message will appear on the computer.

'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 2
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 2

Step 2. Open the task manager

Press the Ctrl, alt = "Image" and Del keys at the same time and select the task manager from the menu that appears. Then click on the "Username" tab and look for the records that are identified with the name of your account. You can terminate most of the programs that appear in the task manager without causing a computer crash.

'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 3
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 3

Step 3. Close the programs you recognize by clicking on them and pressing the "End process" button

If closing one of the programs makes the system unstable, restart the computer to solve the problem

'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 4
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 4

Step 4. Restart the computer

If you restart your computer, you can often stop programs from accessing the file you are about to delete. Restart the computer and try to delete the file before opening any other programs.

Method 2 of 3: Use a third-party program

'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 5
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 5

Step 1. Look for a program that unlocks computer processes

Some popular options are: Process Explorer, LockHunter, Unlocker or Lock UnMatic and Mac OS File Unlocker for Mac. All of these programs are free and are integrated into the Windows interface. If you choose to use Unlocker, be careful when browsing their website, because there are many misleading advertisements that can install malware on your computer.

'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 6
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 6

Step 2. Install the program

The installation processes for both programs are relatively straightforward. Unzip the files (if necessary) and open the "Setup" or "Install" application. The default settings work for almost all users.

Some programs may try to install toolbars for Internet browsers. Make sure to uncheck the corresponding boxes if you don't want to install these toolbars

'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 7
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 7

Step 3. Right click on the file you want to delete

Then select the program to unlock processes from the drop-down menu. This will open a new window with a list of all the programs that have access to the file.

'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 8
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 8

Step 4. End the programs

Select the program you want to end and click the "End process" button. When you close all the programs that have access to the file, you will be able to delete the file without problems.

Method 3 of 3: Use the command prompt

'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 9
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 9

Step 1. Locate the file you want to delete on the hard drive

If you can't find the file, use the search function. Click on the start menu and type the name of the file in the search field. In Windows 8, just start typing the file name while on the start screen.

'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 10
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 10

Step 2. Right click on the file and select the "Properties" option

Uncheck all file or folder attributes.

'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 11
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 11

Step 3. Make a note of the file location

You'll have to relocate it later, when you forcibly delete it at the command prompt.

'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 12
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 12

Step 4. Open the command prompt

Click on the start menu and type "cmd" in the search field.

'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 13
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 13

Step 5. Close all the programs that you have open

Close all open programs, except for the command prompt.

'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 14
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 14

Step 6. Open the task manager

To do this, you can press the Ctrl, alt = "Image" and Del keys at the same time and select the task manager from the menu that appears. If not, you can go to the start menu, press "Run" and type "TASKMGR. EX".

'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 15
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 15

Step 7. Click on the "Processes" tab within the task manager

Click on the "EXPLORER. EXE" process and press the "End process" button. Then minimize the task manager, but leave it open.

'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 16
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 16

Step 8. Return to the command prompt window

Return to the command prompt window. Here you can forcibly delete a file or folder with a basic command line tool. While both files and folders can be erased in basically the same way, there are subtle differences in the command to use.

Step 9. Find the path:

C: \ Documents and Settings \ Your username>. This will be at the command prompt.

'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 17
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 17
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 18
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 18

Step 10. Run the command

In the command prompt window, enter: cd Documents after your username.

'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 19
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 19

Step 11. Delete the file

After "My Documents", enter the delete command followed by the name of the file you want to delete. For example: "del My File.exe".

'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 20
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 20

Step 12. Use the "DEL" command to delete the file

The final command should look like this: C: \ Documents and Settings \ Your username \ My Documents> del My File.exe.

'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 21
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 21

Step 13. Delete a folder

If you want to delete a folder and not a file, use the "RMDIR / S / Q" command instead of the "del" command. It should look something like this: C: \ Documents and Settings \ Your username> rmdir / s / q "C: \ Documents and Settings \ Your username \ My Documents \ My File".

'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 22
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 22

Step 14. Press the alt = "Image" and Tab keys

Thus, you will return to the task manager, where you can select New task and then type "EXPLORER. EXE" to bring up the Windows interface.

'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 23
'Image titled Delete a File or Folder Showing Error "Access Is Denied" Step 23

Step 15. Close the task manager

The file is supposed to be deleted, but if you want to verify it, search for it by going to Start and then entering it in the search bar.

Advice

  • To learn more about DOS commands, type "HELP" (without quotes) at the command prompt window or search the Internet.
  • To go back in the directory path via the command prompt window, use the following command:

    CD.

Warnings

  • This trick will not work if a program uses the file you are about to delete. For example, if you want to delete a song that you listen to on your computer, you have to close the music player and delete the file.
  • Do not end any other process apart from "EXPLORER. EXE", as it may cause undesirable results such as loss of information, instability in the system and failure or corruption of the operating system.

Popular by topic