Cannot delete file: Access is denied

How many times have you seen this error? If I want to delete a file, I WANT TO DELETE THE FILE! At least windows should tell you, who is locking the file, right? Here are some helpful hints to get you around this common windows problem.


You’ve seen these errors. So painful.

Make sure the disk is not full or write-protected and that the file is not currently in use.
Cannot delete file: Access is denied.
The file is in use by another program or user.
There has been a sharing violation.
The source or destination file may be in use.

First I would suggest trying to find out why the file is locked. If it is spyware or a critical process, you may want to know that such a problem exists. WhoLockMe will allow you to right-click any file and see what program is locking the file. A more powerful version of this is actually unlocker than will allow you to kill the processes that are locking file file and delete them automatically.

If you want to try to avoid installing more software, you can try these helpful hints in the prior recipe:
Access Denied — How to Delete Protected or Spyware Files. By using these techniques, many times you’ll be able to close the locking program and continue with your day without downloading additional software.

How to delete locked files is one of the most requested problems at my PC shop. Maybe, this will keep me off the phone!

The Conversation

Follow the reactions below and share your own thoughts.

29 Responses to “Cannot delete file: Access is denied”

  1. December 10, 2008 at 1:36 am, icanhelp said:

    Most times when this this happens the first thing i try to do is rename the file. I usually get an access is denied error for that as well, but if the file has subfolders try renaming those too. This usually doesn’t work but it does for some files.

    Reply

    • August 11, 2010 at 6:04 pm, Mehrotra001 said:

      Can U guide to locate locking handle of ‘access denied’ files, USBs etc?
      Please respond by mail at mehrotra001@gmail.com ,+ 91 9979874999

      Reply

      • July 27, 2012 at 5:28 pm, SANJAY RAUT said:

        > > login as administrator
        rt click on the folder
        select properties
        select securety
        select full fontrol
        select ok
        then try to delete the folder
        100% folder is deleted

        sanjay raut
        9440871084

        Reply

    • July 27, 2012 at 5:12 pm, SANJAY RAUT said:

      > # Right-click the folder that you want to take ownership of, and then click Properties.
      # Click the Security tab, and then click OK on the Security message, if one appears.
      # Click full control check box and then click ok .
      # know try to delete the folder

      If you want to take ownership of the contents of that folder, click to select the Replace owner on subcontainers and objects check box.
      # Click OK.

      You may receive the following error message, where Folder is the name of the folder that you want to take ownership of:
      You do not have permission to read the contents of directory Folder. Do you want to replace the directory permissions with permissions granting you Full Control? All permissions will be replaced if you press Yes.
      # Click Yes.
      # Click OK, and then reapply the permissions and security settings that you want for the folder and the folder contents.

      Reply

  2. March 10, 2009 at 11:32 am, Anon said:

    far too many ads on this page, it actually put you off wanting to read it!

    Reply

  3. July 09, 2009 at 3:27 pm, shashi said:

    thanks the wholockme program helped me a lot….!!

    Reply

  4. August 31, 2009 at 12:29 pm, Anonymous said:

    If you cannot delete a file or directors, probably it might be corrupted. In such cases no tools will work. Just apply the Command C:/chkdsk/f from windows command prompt. this turn the corrupted file and directory to normal status and you can delete the file easily as you do usually.

    sknyer – the superwiz tech -

    Reply

  5. November 10, 2009 at 10:58 pm, Sharon said:

    thanks for giving a straight answer and not sending me to a “you need a registry scan site” we know the purpose of those sites, to earn commissions.

    your site is very helpful and valuable. i am bookmarking it.

    i’ll be back…

    hasta la vista, baby

    Reply

  6. December 24, 2009 at 2:28 am, Anonymous said:

    How do you delete a file or folder where you get an error message beginning “(file or folder name) refers to a location that is unavailable”? I’ve got a whole lot of files where I get this message. I can’t rename them, delete them, move them or change the file extensions on them. Unlocker or delete-on-reboot don’t work on them. Advice, please. Thanks. Ian

    Reply

  7. January 12, 2010 at 4:26 am, pissedoff said:

    went to the unlocker link above..guess what came up…PERMISSION IS DENIED..LOL..thanks alot for nothing

    Reply

  8. January 12, 2010 at 4:26 am, pissedoff said:

    went to the unlocker link above..guess what came up…PERMISSION IS DENIED..LOL..thanks alot for nothing

    Reply

  9. March 03, 2010 at 6:19 am, Anonymous said:

    Some files are inside Windows users folder and have stronger security settings. This happens more often with Illustrator files and folders having at one point highter settings. Unlocking these files, trying to delete them using the command propmt or even using administrative access does not work. You can often avoid this if you keep these type of files outside of the Windows user folder.

    Solution: You can still delete them if you change your user setting “Turn User Account Control Off.” After deleting you can reset the secruity setting.

    Reply

    • March 25, 2010 at 6:45 am, Anonymous said:

      Just go to drive, where you folder of file is contained . right click to open security . Select the user with which you have loged in and under assign full control.
      this will work if you have permission of assigning access rights.

      Reply

    • June 20, 2010 at 5:48 pm, Shashwat Tripathi said:

      thank

      Reply

  10. March 27, 2010 at 1:12 am, saptami sarkar said:

    Hi,
    I just had this ditto issue with 3 real player files, they are finally gone.
    This is what I did.
    1) Uninstall the programme ,re-install it later if you choose to.
    2) create a folder
    3) delete the folder instead of individual files together

    Well It worked for me…

    Reply

  11. May 03, 2010 at 8:43 am, nazim said:

    icanhelp – thanks a lot. i had an .flv file which was simply refusing to go away. i changed the .flv to .txt; after that i changed the name of the file itself. then i hit the delete key. it went away… phew!

    Reply

    • July 08, 2010 at 10:00 pm, Xxxeni said:

      WhoLockMe.exe (from Paris, France) has spyware/malware in it. It is nasty to advertise it as the least. Should be criminal.

      Reply

      • July 08, 2010 at 10:05 pm, Xxxeni said:

        Do you know what governments do to spies? They prosecute them – prison terms or a death penalty. Yet those who load spyware, malware etc. into person computers are ignored, is this legal? Spyware loading into any computer should be made criminal!

        Reply

    • July 26, 2010 at 11:57 pm, Terrym2442 said:

      nazim- THANK YOU. I spent the last 1/2 hr trying all kinds of fixes and only yours worked.

      Reply

  12. August 26, 2010 at 1:56 am, Shgs03 said:

    My operation system is Windows xp2. I log off guest. then i want to delete file for D driver. But can not delete file. Because access is denied. Why? Help me?

    Reply

  13. December 11, 2010 at 11:21 am, Ajayrajawat009 said:

    i want to normal user can not delete created file in lan network.on windows xp and server2003

    Reply

  14. February 20, 2011 at 11:43 am, Sader said:

    Its very easy and simple…just rename the file and make it .txt extensions and then tru to delete it, it will work right away..Ali

    Reply

  15. February 17, 2012 at 3:16 am, SAFE MODE said:

    safe mode with command prompt rocks mothers to ”access denied files”

    (rock)

    :) ))

    Reply

  16. February 28, 2012 at 1:10 pm, JoshuaReen said:

    I have used “Long Path Tool” software in this situation and it helped me easily and quickly.

    Reply

  17. July 28, 2012 at 1:58 am, Jose Bautista said:

    The process is too complicated,besides that I don’t want to know who got those files locked in; after I find out who got those files locked in,what will I do? it won’t help me, will “WhoLockMe”help me delete the files?
    if not,then what is the use to use this program? and the other program that will help delete those files
    “Unlocker” the link is broken” I don’t see any purpose on this little program,unless a help me to delete those files. The installation of the program is too complicated for nothing

    Reply

  18. October 03, 2012 at 9:41 pm, anothersolution said:

    The extension renaming can work, but this is what I did: Opened the folder and deleted the files inside one by one, hoping to find the culprit. Nothing hung me up (I think it had something to do with the google chrome files inside), then was able to delete the folder once empty.

    This happened twice, once in a document folder on my desktop with photos inside, and once to delete the temporary user I made and deleted – had to do the same thing to get rid of the residual data files placed on my desktop.

    Reply

  19. January 19, 2013 at 8:46 am, Joel said:

    Hi. I can’t delete a file in the SCAN folder (automatic folder where scanned docs are saved) of my friends PC. I have tried using the DOS prompt with the explorer.exe closed. I have also tried the softwares that can be used to delete “access denied files” but failed. Please help. Thanks.

    Reply

  20. March 30, 2013 at 4:25 am, Xian Sembrano said:

    Do you have error messages?, like :
    Path too long
    Error cannot delete file: cannot read from source file or disk
    Cannot delete file: Access is denied
    There has been a sharing violation.
    Cannot delete file or folder The file name you specified is not valid or too
    long. Specify a different file name.
    The source or destination file may be in use.
    The file is in use by another program or user.
    Error Deleting File or Folder
    Make sure the disk is not full or write-protected and that the file is not
    currently in use.
    Error Copying File or Folder.
    Cannot remove folder.
    The filename or extension is too long.
    Path too deep.
    Destination Path Too Long.
    Could not find this item.
    Filename is not valid.
    The file could not be accessed.
    The path you entered, is too long. Enter a shorter path.
    File Name could not be found. Check the spelling of the filename, and verify
    that the file location is correct.

    If yes, our progam will be helpful for you. Fix filename too long, filename is
    too long, too long path and path too long problems forever.

    “Long Path Tool” ——search it from google.com

    Reply

  21. February 26, 2014 at 3:50 am, alay said:

    i can’t select the full control check box how can i select i have already logged in as a administrator

    Reply

Leave a Reply