Sei sulla pagina 1di 5

6/24/2014 3 Ways to Delete a File or Folder Showing Error "Access Is Denied"

How to Delete a File or Folder Showing


Error "Access Is Denied"
Three Methods: Closing Open Tasks Running a Third-Party Program Using the Command Prompt

It’s happened to all of us, during a hard drive purge or a virus cleanup. There
you are, merrily deleting unwanted 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 may seem like you’re stuck with that file, but just follow this guide
and you’ll be rid of the file in just a few minutes.

Method 1 of 3: Closing Open Tasks

1 Close any open programs. The most common cause of this error message is a
program currently accessing the file you are trying to delete. For example, if you are
trying to delete a document that is currently open in Word, or trying to delete a song that is
currently playing.[1]
Close any programs that you have open on the screen and try deleting the file
again.
Close any file-sharing programs. Many file sharing programs transfer files behind
the scenes. If the program is trying to transfer the file while you delete it, you will
receive the error message.

Ad
$0.01 Web Hosting
hostgator.com/1Penny
Scalable, Secure Web Hosting. Try Our Award-
Winning Service Now!

2 Open the Task Manager. Press Ctrl + Alt + Del and select Task Manager from the
menu. Click on the User Name tab and find the entries under your User Name. Most
of these programs can be ended without causing the system to crash.
Close the ones that you recognize by selecting them and clicking End Process
If you close a program that causes the system to become unstable, restart your
computer to restore.

3 Restart your computer. Oftentimes restarting your computer will release the hold
that a program has on a specific file. Try deleting the file after restarting and before
you start any other programs.

http://www.wikihow.com/Delete-a-File-or-Folder-Showing-Error-%22Access-Is-Denied%22 1/5
6/24/2014 3 Ways to Delete a File or Folder Showing Error "Access Is Denied"

Method 2 of 3: Running a Third-Party Program

1 Find a process unlocking program. Popular options include Unlocker and


WhoLockMe. Both of these programs are free and integrate into your Windows
interface.[2]
Both programs have relatively simple installs. Unzip the file if necessary and open
the Setup or Install file. The typical installation settings will work for most users.
Some programs may try to install web browser toolbars during the installation.
Make sure to deselect these if you don’t want new toolbars.

2 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 will be displayed showing all of the
programs that are currently accessing the file.

3 End the programs. Select the program that you want to end and click the Kill
Process button. Once all of the locking programs are closed, you will be able to delete
the file without issue.

Method 3 of 3: Using the Command Prompt

1 Locate the file stored on your hard drive.

If you are not able to locate the file, try using Search option. Click the Start menu
and enter the file name into the Search field. In Windows 8, start typing the file
name when you are at your Start screen.

2 Right-click on the file and choose Properties .Remove (uncheck) all the attributes
of the file or folder.

3 Make a note of the file location.

4 Open a Command Prompt Window. You can do this by Clicking on Start and
typing “cmd” into the Search field.

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

http://www.wikihow.com/Delete-a-File-or-Folder-Showing-Error-%22Access-Is-Denied%22 2/5
6/24/2014 3 Ways to Delete a File or Folder Showing Error "Access Is Denied"

5
close all other open programs.

6 Open the Windows Task Manager. Press Ctrl + Alt + Del and select Start Task
Manager from the menu.

7 Click on the Processes tab of the Windows Task Manager. Find the process
named “explorer.exe”. Select it and click on End Process. Minimize Task Manager
but leave it open.

8 Return to the Command Prompt window. Follow the example below for deleting a
file named “myFile.exe” located in My Documents.

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>

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

9 Delete a folder. Follow the example below for deleting a folder named “New Folder”
located in the My Documents directory.
In Command Prompt navigate to the 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 "<path>" (where <path> 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"

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

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

Ad

http://www.wikihow.com/Delete-a-File-or-Folder-Showing-Error-%22Access-Is-Denied%22 3/5
6/24/2014 3 Ways to Delete a File or Folder Showing Error "Access Is Denied"

Facebook® Account Sign Up


facebook.com
Connect With Your Friends Online. Join the
Facebook Community - Free!

Tips

For more information on DOS Commands, type HELP in Command


Prompt Window or you can search over Internet.
If you want to change your Drive in Command Prompt Window use the
following Command:
Syntax: <Drive Letter>:
Example: C:\Documents and Settings\XYZ>D:
D:\>
To move BACK to previous directory in Command Prompt Window you
can use the following command:
CD..

Ad
Facebook® Account Sign Up
facebook.com
World's Largest Online Community. Join for
Free & Enjoy the Benefits!

Warnings

Don't forget to Add New Task "EXPLORER.EXE" in Task Manager.

This trick will not work if the file to be deleted is being used by some
other program. Like an mp3 file that is being played but you want to
delete it. In this case close the media player that is playing the file and
then delete it.
Don't terminate any other process except "EXPLORER.EXE".If done it
can cause undesired results including loss of data, system instability and
Operating System to crash, or corrupt.

Sources and Citations

http://www.wikihow.com/Delete-a-File-or-Folder-Showing-Error-%22Access-Is-Denied%22 4/5
6/24/2014 3 Ways to Delete a File or Folder Showing Error "Access Is Denied"

1. ↑ http://superuser.com/questions/13291/how-do-i-delete-a-locked-file
2. ↑ http://forums.iobit.com/showthread.php?p=75819

Article Info

Categories: Windows Files | Windows Folders

Recent edits by: Adelaide, Lutherus, Howtoo

In other languages:

Português: Como Excluir um Arquivo ou Pasta que Mostra o Erro "Acesso


Negado", Español: Cómo borrar un archivo o folder que muestra el error "Accesso
denegado", Deutsch: Wie man eine Datei oder einen Ordner mit dem Fehler ''Zugriff
verweigert'' löscht, Italiano: Come Cancellare un File Quando Windows ci Dice "Accesso
Negato", Русский: удалить файл или папку, которая выдает ошибку "Access Is
Denied"
Ad
Various Type Road Sweeper
yhroad.com/road+sweeper
New & Various road sweeper for sale Call at
8637186053830 for more info

Thanks to all authors for creating a page that has been read 239,744 times.

http://www.wikihow.com/Delete-a-File-or-Folder-Showing-Error-%22Access-Is-Denied%22 5/5

Potrebbero piacerti anche