Unable to delete folder in windows 7?

06
2014-04
  • avirk

    I'm unable to delete some folder on my external hard disk. I tried them to delete in safe mode too but I'm not able to perform this. This is a big headache to me now. Even I'm the admin and it still needs the admin privileges to delete them. So how can I get rid of from this trouble? Please help me!

    enter image description here

  • Answers
  • Klemen Košir

    You could also try Unlocker. It unlocks or kills the process that is using the file/folder and deletes/renames it.

  • Moab

    Try getting the ownership of the folder:

    Right-Click the folder -> Properties -> Security tab -> Advanced button -> Owner tab -> Edit button -> Select your user account -> Activate Replace owner on subcontainers and objects.

    When done, close all properties windows and open Properties again -> Security tab -> Advanced button -> Permissons tab -> Change Permissons button -> Add your user account and select Replace all child object...

    Then try again.

  • Thomas

    My husband had the same problem with his external drive. This is what I did to delete it. These are the steps I followed in windows 7 while logged on under administrator...not sure that part was necessary, but I wanted to include that bit of information.

    Phase 1 - Taking ownership

    1. Right click folder
    2. Select "properties"
    3. Select the "security" tab
    4. Click the 'Advanced" button
    5. Select the "owner" tab
    6. Click the "Edit" button
    7. Under 'change owner to' highlight the user you wish to set as owner
    8. Check the 'replace owner on subcontainers and objects' box
    9. click the 'apply' button (this will take you back to the 'advanced security settings' window)

    Phase 2 - Permissions

    Once you are back in the 'advanced security settings' window follow these instructions (Note: You MAY have to close out the properties window altogether and then re-open it for the above changes to take effect before performing the next set of steps).

    1. Select the 'permissions' tab
    2. Click the "Change permissions" button
    3. Highlight the user you need to change permissions for
    4. click the 'edit' button
    5. Check "allow" box next to full control
    6. Click "Ok"
    7. Check the box next to "include inheritabl permissions from this object's parent"
    8. Check the box next to "replace all child object permissioms with inheritable permissions from this object"
    9. Click "apply"
    10. Click "yes" in the pop up box"
    11. Click "OK" to close permissions window
    12. Click "Ok" to close advanced security settings window
    13. Click "ok" to close the properties window

    You should now be able to delete the un-deletable folder.

    Phase 3 (it is a shared folder)

    Be sure to do the following steps :

    1. Properties
    2. Sharing tab
    3. Share ... Be sure you have your user with read/write Permission level
    4. Come back, Advanced sharing
    5. Permissions be sure your user is here with Full Control
  • 8088

    Sometimes you can't delete a file or a folder because the filename or a file which is in the folder contains a hidden character.

    You can delete it in a Command Prompt using DOS commands - a bit of DOS command knowledge is needed.

    Once you have a Command Prompt open, navigate to that particular folder, and open it. Delete all files in that folder using del *.*.

    Exit that folder, and you should now be able to delete the folder.

  • Daniel R Hicks

    I've encountered this problem a few times. I've concluded that something in the OS or some background app has a file or folder open, and the system won't let the operation proceed. The error messages are probably somewhat bogus -- they get an error back and assume it's an auth error.

    Never tried to "fix" this since for me it's just an irritation, not a "real" problem. (And what's one more irritation from Windows, in the grand scheme of things?)

  • Nick

    I used Windows cleanup. I accomplished this by following this tutorial. Its for Windows 8 but works just as well for Windows 7.

    Press Start -> Type "cleanmgr" and press enter -> Select Windows Drive -> Then find previous Windows installations -> check it -> press OK

    That worked for me.

  • Roger Dodger

    I had this problem and successfully used the idea of moving and/or incrementally deleting items.

    I could not move a folder with two sub-folders and files. It was an old folder, so there was no way anything imaginable could have been using it. I used resource monitor ("search" box, above right section of the handle-and-file sub-window under CPU activity) to verify that the Explorer process window did have something associated. The ONLY process associated with them was the display window (Explorer) and they seem to only have been there because they were within the list of folders being displayed. No other processes were active.

    Otherwise, there were no active processes using these files or folders. I checked for lock files or other odd things like hidden or system files and there were none. The command prompt didn't help. Each item had the same name, and I could not move the parent folder in DOS either. NOTHING seems to explain why I could not delete the parent folder, so obviously my knowledge of the intricacies is deficient.

    I managed to use Windows Explorer to move each folder's files to another folder (even used the same folder names, but did not copy the name in case an invisible character was there). After moving files, I deleted the folders. Then I put them all in a duplicate file structure right where the old one "was", to see if I could (I could). Finally, I moved the folder (and contents) to its intended new destination. I'm happy! :-)

  • Canadian Luke

    Just use this text, save it in .reg file, and run this. After this, you can delete/rename these kind of locked folders in single click.

    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\*\shell\runas]
    @="Grant Admin Full Control"
    "NoWorkingDirectory"=""
    
    [HKEY_CLASSES_ROOT\*\shell\runas\command]
    @="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
    "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
    
    [HKEY_CLASSES_ROOT\exefile\shell\runas2]
    @="Grant Admin Full Control"
    "NoWorkingDirectory"=""
    
    [HKEY_CLASSES_ROOT\exefile\shell\runas2\command]
    @="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
    "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
    
    [HKEY_CLASSES_ROOT\Directory\shell\runas]
    @="Grant Admin Full Control"
    "NoWorkingDirectory"=""
    
    [HKEY_CLASSES_ROOT\Directory\shell\runas\command]
    @="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
    "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
    

    See full instruction here on How to Delete/Rename/Move Restricted files with one click

  • firebat

    Try changing the permission of the folder first. Make it editable by you.

    If that doesn't work, try running explorer.exe as the SYSTEM user.


  • Related Question

    windows 7 - Why am I unable to delete an album in the 'My Music' folder?
  • user15557

    I'm new to this and got Windows 7 the other day.

    What I am wanting to do is simply delete an album from the 'My Music' folder but I can't seem to be able to do this - if I right click, there is no delete option.


  • Related Answers
  • Ivo Flipse

    I will start answering in the comment section. I found the answer: It wasn't to do with permissions, it was the way I accessed the 'my music' folder - from the start menu, I could only 'view' the music folder but if I go through my documents and user to 'my music' I can then have full control so I just changed the path to point to that version from the start menu