Access Denied — How to Delete Protected or Spyware Files
Posted by David Kirk in Windows spyware
When trying to delete spyware files, users will often get errors. Here is how to overcome the spyware’s protection over these files.
I hate this error — Access Denied. Damn spyware has got the file locked… and now I’ve got to figure out how to unlock it. This is much more art than science but I’ll tell you how I typically walk through the program.
If you can’t even find the file that you need to delete, you might want to try this trick:
Find Files and Spyware that are Really Hidden
- 1. Change your system so you can view and edit your hidden and system files:
http://www.tech-recipes.com/rx/685/xp_2000_view_and_remove_hidden_files_and_folders
2. Close all programs. Sometimes a currently running program will have locked the file. Typically this won’t work, but you’ll feel silly missing it.
3. Boot to safe mode. Booting to safe mode will often disable spyware programs that might be holding access to the files in question. You might as well stay in safe mode for the rest of the process.
4. Force stop unknown programs and processes. CTRL-ALT-DEL will bring up the task manager that will allow you to kill unknown programs and processes. If you can’t use the taskmanager, you can try some of the freeware replacements such as:
http://www.sysinternals.com/ntw2k/freeware/procexp.shtml
5. Sometimes it is just easier to delete the file in a dos box. To open a command box:
- Click Start
- Click Run
- In the textbox type cmd.exe and click OK
6. I’m not going to try to teach DOS here, but the command to delete a file is the following:
del \folder\file.exe
7. If you still can’t delete it, you can clear the attributes of the file. If you need details on this, you can read more about it here. The dos command for this is the following:
attrib -r -s -h trojanfilename
After doing this you will still need to delete the file with one of the methods described above.
8. If none of the above work, you can use a specialized file deletion freeware program such as Move On Boot.
9. Booting to a CD-ROM boot utility disk or linux disk is a painful, but almost foolproof, method of deleting files. Here’s that recipe:
http://www.tech-recipes.com/rx/469/boot_cd_rom_run_diagnostic_tools
Here’s how to remove infected files from the system restore area:
http://www.tech-recipes.com/rx/8/clearing-infected-files-from-system-restore
If you have any other hints please let us know.
About David Kirk
View more articles by David Kirk
The Conversation
Follow the reactions below and share your own thoughts.


March 16, 2009 at 10:31 am, Wajiudin said:
Can you give me some video for this problem please….i can’t do it…
December 01, 2012 at 5:11 am, Usama112 said:
My You Tube is not Play Please remove mY error.
April 03, 2009 at 4:18 pm, Brett Peterson said:
I tried to download Move On Boot and Trend blocked it as a Trojan.
April 08, 2009 at 4:57 pm, heart said:
Quick note… using dos and the ‘attrib -r -s -h trojanfilename’ command didn’t work but I did it again adding the -a switch and … bye bye file!
It was a frustrating morning trying to get rid of an infected ‘inbox’ file. Thanks for the kick in the head… I rarely even think about dos anymore! =)
June 23, 2009 at 7:17 am, Sheenu Mehra said:
What can we do to open all sites. Like orkut and messengers are not open my pc. Here is some setting to denied the access of these sites.
September 05, 2009 at 5:00 pm, Jeff P said:
Thanks for the help. MoveOnBoot worked like a charm.
October 01, 2009 at 8:22 pm, Anonymous said:
Thanks, helped me delete “Access Denied” files from the Vista folder that I coudn’t delete after installing xp.
October 27, 2009 at 9:08 am, Anonymous said:
i cannot even get pass my password .whenI enter my password it says access server denied,but on the same computer my husband can use his password and log on.Any sugghestions pleas???
January 06, 2010 at 1:37 am, Anonymous said:
Thank you very much =P I had a virus, and i just had to close the process of this program to be able to delete it, I didn’t even think about it, thanks again =)
January 18, 2010 at 2:22 am, Anonymous said:
Make a note of files and folders to be deleted. Best of all use a Knoppix Live cd or Ubuntu Live cd boot from it and carefuly delete the files/folder you want to delete.
February 05, 2010 at 3:14 am, sean said:
HI,i was deleting alot of stuff like photos and vids.i moved them to the bin first and hit empty recycle bin than the bin appeared to have something in it still so i opened it up and nothing was there.so i go and try to delete something else and empty then i get,cannot delete Dc247:access denied.make sure the disk is not full or write protected and that the file is not currently in use.any idea what’s going on here?
February 07, 2010 at 12:11 pm, ocky said:
meh this is way to complicated without vid, check out this it god rid of all my viruses easy
March 13, 2010 at 5:42 am, James Bond said:
This information was even better then what I found on Microsofts website.
Thanks a lot for the cure.
Sincerely, James Bond
http://www.nBay.com/classifieds
March 17, 2010 at 8:09 am, Anonymous said:
My antivirus actually spotted the virus in the file and prevented access to it so I couldn’t delete it. The cure was to scan it with the antivirus and then select delete rather than block as the action.
April 20, 2010 at 6:12 pm, Anonymous said:
Hi .. i have got one new folder automatically added in my E drive .. and i am not able to delete it ..each time i am trying to delete it ..it is saying access denied.. below is the structure of the folder:
E – da3c4e61432f66f15973d6
da3c4e61432f66f15973d6 – amd64 and i386
in these above 2 folders there are certain files which are giving access denied.
My comp has started crashing each time i reboot it ..that is might be because of this folder..
Please guide me how to delete it.
May 13, 2010 at 1:34 pm, A helpful friend. said:
That’s used for display drivers. Don’t delete those. You might crash your computer.
April 29, 2010 at 8:24 am, abby said:
i am unable to delete norton360 antivirus completely .. please help me out..
July 19, 2010 at 10:38 am, Maheshk Sarswat said:
plzz help mee
my one file on desktop “deco_sagar glass.xls” is encrypted.
now when i select the icon of this file or other file save on my desktop, my pc gonna hang..
i try to delete this file from dos..
c:decuments and settingsadmindesktopdel deco_sagar glass.xls
bt i cant succeed ..
plzzz help mee what can i do….
my e-mail address is maheshk.sarswat@yahoo.com
plzz help..
December 29, 2010 at 3:47 pm, Maheshk Sarswat said:
go to windows explorer and then go desktop..n select the desktop folder..go to its property..n unmark the encrypte option..
then apply and then ok..
i’m sure..that u’ll fild yr answer..
thank u..tk care..
my id maheshk.sarswat@yahoo.com..u can reply mee…
August 27, 2010 at 8:51 am, Anonymous said:
I am tired of all the adware/spyware crap on my computer. Anybody have an opinion of what the best software to remove it is at the moment? Thanks.
_____________________________
antispyware download
September 07, 2010 at 12:12 am, Doggmatic28 said:
ROCK IT. thanks chap. I couldn’t get rid of the protected files with CYGWIN. I read your approach for deleting files with DOS and BAM! gone with no remorse. thanks for your assistance.. long live the web.
September 17, 2010 at 3:43 pm, Phil said:
Thanks soooooo much this helped me a lot!
October 22, 2010 at 1:29 am, Manoj said:
I have downloaded a movie and then the Avira anti virus prompted me a msg for a malware. below is it’s post event description. “Virus or unwanted program ‘EXP/ASF.GetCodec.Gen [exploit]‘
detected in file ‘E:Movie downloadsLegend Of The Guardians The Owls of Ga’Hoole (2010) DvDRiP XViD H264 [EnG] – RxLegend Of The Guardians The Owls of Ga’Hoole (2010) DvDRiP XViD H264 [EnG] – Rx.avi.”
How to retrieve this file again? As this file is simply not there in my computer. Is it deleted? pls help me to retrieve the file
Action performed: Deny access
November 02, 2010 at 1:29 pm, sublimestylee said:
tell you what, i found what im about to say to be uber super helpful, but im not sure if it will be to anyone here. still worth a mention. i download all sorts of random apps, and programs and such, i dont know which one it is but something i have installed, allows me to right click on a file i dont have permissions for and shows the little security shield(like for user account control)right before the text: take ownership. so really chicken or egg here, would i need this app if i didnt download ridiculous ones all the time, or did my lil fascination(ok, kind of obsession)that all my computer friends tease me about come to my rescue, you decide. (google around im sure youll find something, id do it for you but damn i just have so many lil apps)
February 24, 2011 at 7:49 pm, Jonny said:
You are soooooooooooooooooooooo awesome
April 11, 2011 at 1:33 pm, K. Ramamoorthi said:
I downloaded some video file from my mail. Now I want to delete. But I can’t delete. When I delete it is saying access is denied. Please help me. my email address is: krmoorthi75@gmail.com
July 10, 2011 at 3:21 pm, Aliie said:
unlocker is virus
July 10, 2011 at 3:24 pm, Michael said:
unlocker is a virus
February 28, 2012 at 1:12 pm, JoshuaReen said:
I like this way. This trick is good for users who love to play with technical ways. However, I have used “Long Path Tool” software in this situation and it helped me easily and quickly. So this tool is best for those members who don’t love to play with technical skills.
June 05, 2012 at 6:57 am, Sam said:
I did that. thanks for help.
June 16, 2012 at 7:33 pm, Charlie said:
Ahhh, good old DOS! haven’t really touched that since the 286-through to 486 days… hahah
July 05, 2012 at 4:17 pm, Mike said:
It still gives me “access is denied”!!!! I don’t get it!!!!
May 13, 2013 at 2:25 pm, Herschel Cannon said:
Thanks a lot, this fixed my problem.
The intruding software could not be deleted because it was repeatedly launching itself.
Booting in safe mode was the trick!