“Cannot delete file: Access is denied.”
That’s a message often pops up in Windows when you’re trying to delte a file that doesn’t want to be killed. Other roadblocks include “There has been a sharing violation,” “The file is in use by another program or user,” and “Make sure the disk is not full or write-protected and that the file is not currently in use.”
Typical culprits include no-longer-welcome antivirus software, security programs and home-built code that didn’t properly close an open file on exit.
In response, some try incrementally closing running processes, one at a time, till whatever was holding them up lets loose. Others continually reduce items in Startup then reboot, again and again.
Sometimes it works, sometimes it doesn’t.
There are a couple of better and easier ways to bypass these errors, kill the desired program, and go on about your business. And amazingly, they’re free.
The first utility, Unlocker, adds a right-click option that lists running processes and allows you to pick items to unlock for access or deletion.
Keep in mind that many running processes cannot be interrupted without screwing up your system. So it’s up to you to choose wisely. You can download the latest version of Unlocker at the author’s site. (Installation tip: To prevent Unlocker from automatically contacting its update server, you must unclick “Check for Updates” when you install it.)
If Unlocker doesn’t get the job done, try MoveOnBoot. As the name implies, MoveOnBoot renames, moves or deletes the offending file(s) when you reboot. It even helps you remove files that can’t be deleted in Safe Mode, including the occasional virus file that a/v software can’t kill. The most current freeware version of MoveOnBoot can be downloaded at Softpedia.
Together, Unlocker and MoveOnBoot can help you finish the job when standard procedures like Uninstall don’t.
Nevertheless, in the wrong hands, they can break things you don’t want broken. Be careful.
Email Battles Backgrounder, Other Useful Tools:

50 comments
Comments feed for this article
March 28th, 2006 at 4:54 pm
DontMatter
Unlocker rocks! It works and the beset part is that its free
March 28th, 2006 at 8:31 pm
Nathan Given
Another neat program is called “Who Lock Me?” It doesn’t kill any processes, but it does tell you who has “locked” the file you are trying to delete.
Just do a google search for “WhoLockMe” and you’ll find it (it is freeware, C++, for windows only).
March 29th, 2006 at 12:26 am
Stephan Sokolow
Nice to see some methods of partial relief exist. The ability to delete files that are in use was one of the nicest side effects I discovered when I moved my main system over to Linux. (UNIX-style file handling treats file names and open file handles as equal-strength links to the actual file. That’s where the term ‘hard link’ (and by proxy, ’symlink’) came from.)
March 29th, 2006 at 2:17 am
david
Also check out the link below - tells you what’s open, and who’s using it - actually - there’s another program for free from sysinternals that tells you EVERYTHING like a super improved task manager.
http://www.sysinternals.com/Utilities/Filemon.html
March 29th, 2006 at 8:40 am
BJ Gillette
No question about it. Filemon’s an excellent multi-function tool. The beauty of Unlocker and MoveOnBoot lies in their value as crafted single function utilities. I keep all three in my toolbox.
March 30th, 2006 at 8:41 am
Claus
These are great tools. I find them very valuable in cleaning a system when some rogue malware process keeps restarting. Often the trick is to find where the crazy “super-hidden” file is via DOS.
I used to use “Who Lock Me” tons of times. A different application that I have found very useful is No� Danjou’s “Locked Files Wizard.” http://noeld.com/programs.asp?cat=misc Not only is is wizard-based for deletion, move or delete at reboot actions, it also comes with a command line version as well.
Anyone who fights malware would find it worth the time to download and stick on their USB stick along with the ones listed in the article!
Cheers!
March 30th, 2006 at 10:56 am
Alice
It Works! I could kiss you, i’m so happy
Thank-you.
March 30th, 2006 at 11:03 am
Cedrick
You do not need move on boot.
If unlocker fails, it will propose to process the operation at next boot. It does it the exact same way that move on boot does. Using the same registry keys.
So move on boot is now redundant.
July 20th, 2006 at 8:59 am
Sudheer Manthri
I recently had my old C drive installed into a new computer and labelled the old C drive as Drive F. Now I am not able to access ‘my documents’ on the F drive (i.e. the old C drive). There are important business files I need to recover from that folder. Can anyone suggest what I can do? TIA
July 20th, 2006 at 12:22 pm
BJ
Hi Sudheer.
Hmm. If you can see files on drive F: with Windows Explorer, your files should be somewhere under F:\My Documents\.
If Windows Explorer can’t find drive F:, I’d start by making sure the drive has power, and its switches are set correctly as a slave.
The person who installed it will know what to do. Take it back.
August 28th, 2006 at 2:08 pm
Shaun
Hi, I have a similar problem with Sudheer. I have connected a hard from an old pc into my current setup.; I am trying to access important documents from my old ‘My Documents’ folder.
When I try to access the folder in Windows Explorer I get Access Denied.
Any help would be great. I need the information from here as soon as.
August 30th, 2006 at 5:39 pm
Erik
The reason you can not access the files is that the security of the ntfs file system is protecting them.
What you need to do is to take ownership of the files.
You do this by booting into safe made and log in as the administrator.
The you right click the top level folder and choose properties.
** I’m doing this from memory so can’t tell you the exact menu option, but poke around and you will find it.
Choose the security tab and click the button for advanced
Look for the tab for ownership. Add youself as the owner and apply to all subfolders and files.
September 6th, 2006 at 9:34 pm
thelanlegend
Another possible reason you can’t access the files (and a much scarier one) is if you enabled encryption on your my documents folder on the old system. If I remember right, unless you can put it back into the old system and log into the same user account and remove the encryption the files are now locked forever. Feel free to correct me if there is a way around this though, I’d love to hear it.
September 11th, 2006 at 3:45 pm
buster
My system crashed and fouled up musicmatch jukebox. I’ve been able to rename it but not delete it. I’ve tried move on boot and unlocker, no good. Tried the simple file sharing/security tab trick,no luck It is not running. Also tried deleting in safe mode..NO. All I get is “cannot delete accessor.dll: access is denied”!! Any thing else???
September 11th, 2006 at 9:43 pm
BJ Gillette
Tell the wife and kids it’s time to spend the weekend visiting Mother.
New c: drive. Make original drive d:.
Spend the weekend watching football, copying and cussing.
September 15th, 2006 at 12:35 pm
buster
Anything I can try a little less drastic??
September 26th, 2006 at 3:35 pm
Chappers
Shaun & Sudheer
I had the same problem. What I did was this:
(1) Open Windows Explorer
(2) Go to Tools > Folder Options
(3) Click on the View tab
(4) Uncheck “Use simple file sharing”
(5) Click OK
(6) Find the folder that won’t let you in
(7) Right-click on it and choose Properties
(8) Click on the Security tab. You may see a user that the new system doesn’t recognise - I assume this was the old “you”
(9) Click on the Advanced button
(10) Click on the Owner tab
(11) Click your new user account, and check the “Replace owner on subcontainer and objects” box
You’ll get a perverse message saying something along the lines of “You don’t have permission to view the contents of this folder, but do you want to give yourself ownership and full access?” (!)
You do, so click Yes
(12) Depending on the size of your folder structure, this could take a while (it’s still churning away for me!) but it works, as I’ve been able to get at the first few folders
(13) Back up your important files to DVD or something, so that we never have to go through this headache again!
Cheers, and good luck
Chappers
November 28th, 2006 at 11:17 am
DR
Can I just say thanks to Chappers. Very well explained, and helped me not trash my former hard drive…
December 11th, 2006 at 9:23 am
Ella
I can not find “Use simple file sharing” in Folder Options, View tab.
My loptop got ruined but the C Drive is still OK, and I have the same problem. I am able to get access to Everything there exept “My Documents”.. Please Help
Ella
December 11th, 2006 at 11:34 am
Ella
Hi
I was able to do it in the Safe mode. I can now access those files, I see them, the size of them, etc, but when I click on them they do not open properly, as if though they were corrupted. Any tips? This problem only exsists in “My documents” folder.
Ella
December 27th, 2006 at 1:38 am
Elensar
Hi,
I downloaded a few movies sometime ago, but recently moved them to another folder. But now that I’ve moved them they seem to be locked, and everytime the EXACT message pops uP!
“Cannot delete file: Access is denied.”
That’s a message often pops up in Windows when you’re trying to delte a file that doesn’t want to be killed. Other roadblocks include “There has been a sharing violation,” “The file is in use by another program or user,” and “Make sure the disk is not full or write-protected and that the file is not currently in use.”
Can someone PLEASE help me ouit??
Early thanks!
December 27th, 2006 at 6:34 am
Elensar
Sorry, it doesn’t say ‘cannot delete file’, rather cannot open file..
December 30th, 2006 at 5:35 pm
Alexander
Great Thanks to Chappers!!!
I got recently my new PC with an old hard disk in it.
I had problem accessing my old files on the old hard disk.
The Chappers’ solution to the problem very well explaned and
I was able to follow these steps to get access
to my ‘Access is denied’ file.
Thanks again,
Alexander
January 9th, 2007 at 2:35 pm
troy
thanks to chappers.. i was almost ready to break stuff, because my old drive c: wouldn’t allow me to boot into windows or reinstall, but i couldn’t access that folder when i put it in as drive d:
I never would have figured this out…. thanks again
February 9th, 2007 at 2:41 pm
Chappers
No problem guys, glad it helped you - that’s why I posted these instructions
February 16th, 2007 at 5:59 pm
Chappers
Ah - it doesn’t work in Windows XP Home Edition.
In their help files, Microsoft say “NOTE: The Simple File Sharing interface cannot be disabled in Windows XP Home Edition.”
Damn.
March 2nd, 2007 at 9:43 pm
Brett
Likr to thank Erik for his knowledge on August 30th, 2006 at 5:39 pm
Erik
The reason you can not access the files is that the security of the ntfs file system is protecting them.
What you need to do is to take ownership of the files.
You do this by booting into safe made and log in as the administrator.
The you right click the top level folder and choose properties.
** I’m doing this from memory so can’t tell you the exact menu option, but poke around and you will find it.
Choose the security tab and click the button for advanced
Look for the tab for ownership. Add youself as the owner and apply to all subfolders and files.
It save all of my son’s files to, as he had a similar situation. THANKS many.
April 16th, 2007 at 2:03 pm
Dieter
Just wanted to add my thanks to the list here. I had a “My Documents 2001-02″ folder on my C: drive which I wanted to delete. C: drive is a FAT32 partition and so there were no permissions to change. No matter what I did, I could not delete that folder, which had a bunch of sub folders and files. Safe mode didn’t work, “simple file sharing” disable didn’t work. I noticed that a lot of the files and folders were set as “read only.” I tried taking the check out of that option on the “properties” dialogue box but that didn’t work either - I could take out the check or the “fill” in that box but after I clicked “apply,” closed it and opened the properties dialogue box again, it was still “read only.” I went to a dos window and removed all the attributes for all the files and folders and sub-folders, but that didn’t work either - they were still marked “read only” even after that. Obviously I’ve got some studying to do however, as soon as I downloaded “Unlocker” and installed it, it deleted the folder - right on man! It gave me a message saying that there weren’t any locks on it and then asked me if I wanted to do one of the actions listed in a drop down box below that. One of the options was, “delete it anyway,” or something like that, and I chose that, and it was deleted. Simple as that.
I’m really curious though, what the heck was going on there? Anyone have any idea?
Thanks again for your help.
Dieter
April 28th, 2007 at 8:45 pm
Matthew W
hi
Well, I’m having “access is denied” problems too. I put my old win xp hard drive into this new comptuer with Vista. When I tried to access the drive it said something about not having access and then a green bar filled accross the screen and suddenly i was able to access any folder on the drive.
It was partitioned into two drives. The same exact thing happened when I tried to access the other partition.
Now, after these events, I tried to access the folder “Documents and Settings” on my Vista C: drive. But, it gave me a screen saying “C:\Documents and Settings is not accessible. Access is denied.” Other folders have responded in the same way.
How can I get to these unaccessible folders? Please help me
April 30th, 2007 at 10:09 am
Andrew
Thanks Chappers!!
May 4th, 2007 at 6:37 am
Jeff
Hi andrew,
seems to be most peoples problem in Winxp home - however, here’s the solution www.xphometools.com - they do a simple program to ‘take ownership’ in Winxp home version Registration form is here:
https://www.plimus.com/jsp/dev_store.jsp?developerId=46827
May 9th, 2007 at 2:29 pm
ZenMaster
Thankyou wholeheartely Chappers!! None of the so call deleteLockFolder software tools work, so u r greatest than those programmers.
May 28th, 2007 at 9:49 am
Xeek
I have ultimate solution for you all.
I have Win XP Home SP2 (it’ll work on all versions I am sure of it), and I had the same problem
You have to be logged on as administrator in safe mode or on the owner account as normal.
Well… anyway, if you added an old hdd or have a new install of windows that doesn’t want to give you access to the folder and/or files.
1) hit the windows key + R (or Start > Run…)
2) enter cmd in the Run window and hit enter (the console window pops up)
Now that we’re this far.. most people are intimidated by the prompt.
There’s a command line utility available on windows xp home called cacls. For the savvy computer user, I know you just got excited. An ACL is a security descriptor for files/folders granting&denying access to specified users. To learn how to use it type: cacls /?
Suppose your old hdd, the one with access denial errors, was assigned a drive letter of G: (whatever it is). If you want to give EVERYONE access (which you might as well so you can get at your files), type this into the console.
cacls g:\* /t /c /g everyone:f
The g:\* part uses an asterisk (a wildcard) that means it every file and folder.
There are spaces between cacls and g:\* and /t and /c and /g and /everyone:f, it won’t work otherwise.
The /t means to change the ACL of specified files in current directory and all subdirectories (so if you put g:\*, it’ll work on the whole hdd)
The /c means to continue on access denied errors. cacls will keep working even if it encounters [access denied].
/g means we’re going to grant access, everyone is a group of users that takes care of, well… everyone, the :f means to give everyone full control.
June 7th, 2007 at 10:16 pm
arsalan
I jsut upgraded to vista and forgot to back up my files and when i go to them it says acess is denied what the hell should i doo HELPPPP!!!!!!!!!!
June 9th, 2007 at 10:18 am
PowPow
thank you Chappers!
June 23rd, 2007 at 8:36 pm
Sonic
Okay, I downloaded a file today, and I got it to run the first time. Now, it won’t work at all! I tried to delete it using Unlocker, but it says that Unlocker can’t delete the file along with it asking if I want it to try and delete it at reboot. Any help for me? I run Windows XP MCE 2005.
July 1st, 2007 at 10:43 am
Paul
Xeek - I love you.
The casls worked perfectly.
:-) (big smiles)
July 1st, 2007 at 10:52 am
Paul
oops spoke too soon, this allowed acccess to the directory, but unfortunatly its sub directories were still ‘Access Denied’
July 23rd, 2007 at 1:31 am
John
Xeek
I did the cacls g:\* /t /c /g everyone:f and my machine asked me are you sure Y/N. I typed Y and it says the device is not ready. What now?
August 23rd, 2007 at 10:33 pm
CoolGuy
I know its been awhile since anyone has posted here but, you see, is there a program that can OPEN the “access denied” files because there are important files I need from it. And I haven’t found a program that could do so……
October 2nd, 2007 at 3:31 pm
voidmatters
I have something new for all of you.
I can access all folders and files (e.g. in win explorer), however when I create a link to ANY folder and then “double click” it to open that folder, I get an “access denied” message (or its german equivalent: “Zugriff verweigert”). That goes as far as not being able to use “open” in folders of the context menu of the win start menu or other programs not being able to do certain things that require folder links.
I am running xp home on fat32 drives (so there should be no user rights for me?!?) with the “my documents” folder in a subdir of a partition that is not my system partition.
Anyone have an idea of what is going on or how to FIX this? I actually managed to live with that for a while now, but it totally sucks, because linking is vital! Thanks for any suggestions…
October 22nd, 2007 at 3:52 pm
Marko
problem solved…..Use TuneUp Shredder to delete access denied stuff..they will be gone forever….GOOD LUCK
November 1st, 2007 at 12:59 pm
dkew
My problem is similar to above ones, except that I really want to open the “denied access” files. I have some hundreds of PDF, Mp3, and jpg files that can’t be opened, renamed, moved (or deleted.) Suggestions?
November 1st, 2007 at 6:30 pm
dkew
Several hours later: the suggestions above don’t work. The vague DIY ones lead to non-existent options in my Win XP SP2 folders. XPhometools installs, then can’t be found. WhoLockMe either does nothing, or finds nothing to comment on. Unlocker doesn’t unlock anything, nor does Danjou’s Locked Files Wizard. Files that are supposed to move on reboot don’t. The problem files cannot be opened by Administrator in Safe Mode either.
November 3rd, 2007 at 7:42 am
rb
Using laptop unable to set up any mail programs, i.e. yahoo, hotmail, gmail. Can’t get into logmein.com. Checked all security settings, firewall settings, etc. All identical to desktop. Using Netscape or IE, still get “Cannot display web page” Unable to open existing yahoo email accounts. Totally stumped. Any help greatfully appreciated. Need to access files at a trade show and dead in the water.
Thanks.
November 7th, 2007 at 3:28 pm
Olly
Hi i had to use a sytem restore disc the other day to restart my comuter because it crashed and i asked it to keep my documents.
the problem is the was one folder that was marked to be only read by me and now i’ve got a new account i can’t open it
December 6th, 2007 at 11:55 am
Jimbo
Thanks again to Chappers!!! His advice led me in the right direction… it didn’t work straight away but after messing with a few options in that security tab in the properties window it worked!! You rock!
December 14th, 2007 at 12:08 pm
rusty
i have a virus or something that has changed the administrator settings and i can’t get around it. it had locked out my control panel and task manager (and probably other things i don’t know about yet). i keep trying all kinds of different things to access the administrator and change things but nothing works. any suggestions?
February 17th, 2008 at 6:25 pm
Gaurav
I just want to express my sincere thanks to Chappers…you seriously saved me there…i had deleted an old account on my xp computer but it kept all its files for some reason and was eating up my hard drive space…thanks to your technique i was able to get to the files and remove them..thanks again!
February 21st, 2008 at 6:07 pm
Atlanta
I went to several web sites that gave ways to delete folders that were locked, and I also used “Unlocker” but it did not work for me. I even tried it from Windows Safe Mode.
I did finely delete the directory with a program called ” Trojan Remover version 6.6.7″ after running the program to make sure there were no trojans on my computer, I went to => File => Scan File/Directory => Highlighted the directory I wanted to delete => [Right clicked] and selected [Delete].
It worked.
~ Atlanta