Access Denied — How to Delete Protected or Spyware Files

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

David Kirk is one of the original founders of tech-recipes and is currently serving as editor-in-chief. Not only has he been crafting tutorials for over ten years, but in his other life he also enjoys taking care of critically ill patients as an ICU physician.
View more articles by David Kirk

The Conversation

Follow the reactions below and share your own thoughts.

  • Wajiudin

    Can you give me some video for this problem please….i can’t do it…

    • Usama112

      My You Tube is not Play Please remove mY error.

  • Brett Peterson

    I tried to download Move On Boot and Trend blocked it as a Trojan.

  • http://fire-keepers.com heart

    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! =)

  • Sheenu Mehra

    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.

  • Jeff P

    Thanks for the help. MoveOnBoot worked like a charm.

  • Anonymous

    Thanks, helped me delete “Access Denied” files from the Vista folder that I coudn’t delete after installing xp.

  • Anonymous

    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???

  • Anonymous

    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 =)

  • Anonymous

    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.

  • sean

    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?

  • ocky

    meh this is way to complicated without vid, check out this it god rid of all my viruses easy

  • http://www.nBay.com/ James Bond

    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

  • Anonymous

    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.

  • Anonymous

    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.

    • A helpful friend.

      That’s used for display drivers. Don’t delete those. You might crash your computer.

  • abby

    i am unable to delete norton360 antivirus completely .. please help me out..

  • Maheshk Sarswat

    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 [email protected]
    plzz help..

  • Anonymous

    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

  • Doggmatic28

    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.

  • Phil

    Thanks soooooo much this helped me a lot! :)

  • Manoj

    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

  • sublimestylee

    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)

  • http://www.rewards1.com/1799913 Jonny

    You are soooooooooooooooooooooo awesome

  • http://profiles.google.com/krmoorthi75 K. Ramamoorthi
  • Aliie

    unlocker is virus

  • Michael

    unlocker is a virus

  • JoshuaReen

    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.

  • Sam

    I did that. thanks for help.

  • Charlie

    Ahhh, good old DOS! haven’t really touched that since the 286-through to 486 days.

  • Charlie

    Ahhh, good old DOS! haven’t really touched that since the 286-through to 486 days… hahah

  • Mike

    It still gives me “access is denied”!!!! I don’t get it!!!!

  • Herschel Cannon

    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!

  • amd

    I use for remove this error Permissions Time Machine v1.2 to restore default permissions to folder or files or registry keys
    i download it from amyd projects blog

  • TJ

    I would like to thank you for your help. I found this site, which helped me deleted a problem malware program that was on my computer.

    Following your directions, I was, finally, able to remove it.

    Thank you, again.