none
Unable to delete folder

    Question

  • I was trying to delete my old XP Program Files folder ("Archivos de Programa" in spanish version) but I get this warning:

    You require permission from Administrators to make changes to this folder

    In other folders I get a similar warning:

    You require permission from XXXXXX to make changes to this folder

    where XXXXXX seems like a CLSID number

    I have turned UAC off and run Windows Explorer as Administrator, but none of these works.
    Thursday, February 26, 2009 2:22 AM

Answers

  • Try taking ownership of the folder and all files in it.

    Right click the folder in explorer and select "Properties".

    When the property page opens, select the "Security" tab, then click the "Advanced" button.

    After the Advanced Security Settings window opens, select the "Owner" tab, then the "Edit" button.

    Select to change owner to Administrator or your current logon ID, if it is an Administrator.

    Check the "Replace owner on subcontainers and objects" box and click "OK".

    This should close the Edit Owner window.  Close the Advanced Security window.

    If no errors have popped up, re-open the Advanced Security Settings. Select the "Edit" button on the "Permissions" tab, and highlight the line representing the new owner, or one of them if there are two or more.  Double click it or select the "Edit" button.  Select to "Apply to" "This folder, subfolders and files", check Allow on the Full Control check box, and click "OK".

    If no errors popup, you should be able to delete the folder and it's contents.
    • Marked as answer by Enrique S. _ Sunday, March 01, 2009 3:28 PM
    Sunday, March 01, 2009 2:43 AM

All replies

  • Try opening a command prompt and typing:
    cd /d C:\ or wherever your old folder is
    C:\>attrib -s -r -h "Archivos de Programa" /s /d
    C:\>rd /s /q "Archivos de Programa"
    Thursday, February 26, 2009 3:09 AM
  • Thanks, I can delete most of the files, but some still are there:

    C:\>rd /s /q "Archivos de Programa"
    Archivos de Programa\Adobe\READER~1.0\Resource\CMap\Identity-H - Access is denied.
    Archivos de Programa\Adobe\READER~1.0\Resource\CMap\Identity-V - Access is denied.
    Archivos de Programa\ARCHIV~1\Adobe\Acrobat\ActiveX\AcroIEHelper.dll - Access is denied.
    Archivos de Programa\ARCHIV~1\Adobe\Acrobat\ActiveX\AcroPDF.dll - Access is denied.
    Archivos de Programa\ARCHIV~1\Adobe\Acrobat\ActiveX\AcroPDF.ESP - Access is denied.
    Archivos de Programa\ARCHIV~1\Adobe\Acrobat\ActiveX\pdfshell.dll - Access is denied.
    Archivos de Programa\ARCHIV~1\Adobe\Acrobat\ActiveX\pdfshell.ESP - Access is denied.

    All of them are related to Acrobat Reader 8.
    Sunday, March 01, 2009 12:39 AM
  • Try taking ownership of the folder and all files in it.

    Right click the folder in explorer and select "Properties".

    When the property page opens, select the "Security" tab, then click the "Advanced" button.

    After the Advanced Security Settings window opens, select the "Owner" tab, then the "Edit" button.

    Select to change owner to Administrator or your current logon ID, if it is an Administrator.

    Check the "Replace owner on subcontainers and objects" box and click "OK".

    This should close the Edit Owner window.  Close the Advanced Security window.

    If no errors have popped up, re-open the Advanced Security Settings. Select the "Edit" button on the "Permissions" tab, and highlight the line representing the new owner, or one of them if there are two or more.  Double click it or select the "Edit" button.  Select to "Apply to" "This folder, subfolders and files", check Allow on the Full Control check box, and click "OK".

    If no errors popup, you should be able to delete the folder and it's contents.
    • Marked as answer by Enrique S. _ Sunday, March 01, 2009 3:28 PM
    Sunday, March 01, 2009 2:43 AM
  • bnborg said:

    Try taking ownership of the folder and all files in it.

    Right click the folder in explorer and select "Properties".

    When the property page opens, select the "Security" tab, then click the "Advanced" button.

    After the Advanced Security Settings window opens, select the "Owner" tab, then the "Edit" button.

    Select to change owner to Administrator or your current logon ID, if it is an Administrator.

    Check the "Replace owner on subcontainers and objects" box and click "OK".

    This should close the Edit Owner window.  Close the Advanced Security window.

    If no errors have popped up, re-open the Advanced Security Settings. Select the "Edit" button on the "Permissions" tab, and highlight the line representing the new owner, or one of them if there are two or more.  Double click it or select the "Edit" button.  Select to "Apply to" "This folder, subfolders and files", check Allow on the Full Control check box, and click "OK".

    If no errors popup, you should be able to delete the folder and it's contents.



    bnborg said:

    Try taking ownership of the folder and all files in it.

    Right click the folder in explorer and select "Properties".

    When the property page opens, select the "Security" tab, then click the "Advanced" button.

    After the Advanced Security Settings window opens, select the "Owner" tab, then the "Edit" button.

    Select to change owner to Administrator or your current logon ID, if it is an Administrator.

    Check the "Replace owner on subcontainers and objects" box and click "OK".

    This should close the Edit Owner window.  Close the Advanced Security window.

    If no errors have popped up, re-open the Advanced Security Settings. Select the "Edit" button on the "Permissions" tab, and highlight the line representing the new owner, or one of them if there are two or more.  Double click it or select the "Edit" button.  Select to "Apply to" "This folder, subfolders and files", check Allow on the Full Control check box, and click "OK".

    If no errors popup, you should be able to delete the folder and it's contents.

    Thanks, it works!

    Monday, March 02, 2009 9:08 PM
  • Glad to know it worked.

    Thanks,

    Brian
    Monday, March 02, 2009 9:17 PM
  • Hi, I've got a same problem, I used your advice:

    "Try opening a command prompt and typing:
    cd /d C:\ or wherever your old folder is
    C:\>attrib -s -r -h "Archivos de Programa" /s /d
    C:\>rd /s /q "Archivos de Programa"  "
    And... GREAT, it works !!!
    There still some files it cannot delete, I change some permission in Advance Security Windows and I can delete them all.

    Thank you alot!!
    by the way, how did you learn about using all the commands like "attrib -s"... ?
    I'm more than happy if i'm able to learn those stuff like that. :D
    Monday, April 20, 2009 6:30 AM
  • Those of us who had the "benefit" of having to use Dos before there was Windows, are familiar with a command prompt.

    A lot of commands and functionality have been added since then, but the basics are still there.
    Tuesday, April 21, 2009 7:20 PM
  • Hi bnborg... your advise didn't work for me. I'm trying to delete the Windows.old folder, but after doing the things you said, it still says: you need permission from computername/Jan (which is me... and I'm the only user!!!) to make changes to this folder. It's starting to drive me crazy! Also tried the DOS commands option, but that didn't work as well. It's so weird, because I AM the folder's owner now and still it says it needs permission from myself to delete it... why oh why??
    Friday, May 22, 2009 6:37 PM
  • Try first changing the owner of the folder and all contents to yourself.  Then change permissions to permit full control to everyone, again for the folder and all contents.  Sometimes that works to allow you to delete it from a command prompt using "rd /s /q".

    If you are using UAC, that will further complicate things.  You will need to do everything using "Run as administrator".
    Friday, May 22, 2009 7:09 PM
  • Hi, I've got a same problem, I used your advice:

    "Try opening a command prompt and typing:
    cd /d C:\ or wherever your old folder is
    C:\>attrib -s -r -h "Archivos de Programa" /s /d
    C:\>rd /s /q "Archivos de Programa"  "
    And... GREAT, it works !!!
    There still some files it cannot delete, I change some permission in Advance Security Windows and I can delete them all.

    Thank you alot!!
    by the way, how did you learn about using all the commands like "attrib -s"... ?
    I'm more than happy if i'm able to learn those stuff like that. :D

    Hi HayDuy

    Here is a link to the website where you can learn all of the command line commands.

    A-Z Command Line List - Technet

    Hope this helps.

    Thank You for testing Windows 7


    Ronnie Vernon MVP

    Friday, May 22, 2009 7:19 PM
    Moderator
  • Try first changing the owner of the folder and all contents to yourself.  Then change permissions to permit full control to everyone, again for the folder and all contents.  Sometimes that works to allow you to delete it from a command prompt using "rd /s /q".

    If you are using UAC, that will further complicate things.  You will need to do everything using "Run as administrator".
    Okay great... opening a command prompt as administrator and then using the attrib and rd commands worked! Thanks so far!
    The only files that remain undeletable are C:\Windows.old\Windows\system32\Macromed\Flash\Flash10b.ocx and FlashUtil10b.exe... Why can't I delete those you recon?
    Friday, May 22, 2009 8:39 PM
  • Those files must be in use.  You could try uninstalling Macromedia Flash and rebooting.  You could also search the registry for those specific files and see what path is being used.
    Friday, May 22, 2009 8:48 PM
  • Those files must be in use.  You could try uninstalling Macromedia Flash and rebooting.  You could also search the registry for those specific files and see what path is being used.
    Okay I uninstalled Flash and rebooted. Just to make sure, I checked the registry after the reboot and there were no traces of it left. But... I still can't delete those 2 files. Weird huh?
    Friday, May 22, 2009 9:01 PM
  • oh yeah... and I completely turned off UAC
    Friday, May 22, 2009 9:22 PM
  • About the only thing else I can think of is disk corruption.  You can right click on the drive and click on properties.  Then go to the Tools tab and click the "Check now" button in "Error-Checking".  Click start, with "Automatically check file system errors" checked.  When you see the popup about it being in use, select "Schedule disk check".  This schedules a disk check on next boot.

    Saturday, May 23, 2009 1:17 AM
  • Hi again... no it's not disk corruption either. I checked it and there are no errors whatsoever. Still can't delete the damn files :-S
    Thursday, June 04, 2009 7:22 PM
  • Hi, I've got the same problem, running XP. Found any solution?

     

    Sunday, June 14, 2009 9:20 AM
  • One more time.

    Are you sure you took over ownership of the folder and all contents?

    The other thing I would try is to boot into a WinPE command prompt.  You can do this by booting your install disk and selecting "repair my computer".  Make sure you load any disk drivers you need when prompted.

    Open a command prompt when that option is available.  I would run chkdsk (again), chkdsk c: /f.  If C: is the wrong drive, try D: (probably the CD/DVD), E:, etc.

    Once the correct drive is checked, change to it and cd to the folder in question.
        X:\Windows> C:
        C:\> attrib -s -h -r "Program Files"
        C:\> rd /s /q "Program Files"

    If that does not work, I'm stumped.
    Monday, June 15, 2009 12:57 AM
  • Thank you very much - good description. Worked as a charm!
    Thursday, July 22, 2010 6:27 PM
  • Changing security properties did not work for me. The CMD attrib/rd solution did. Thanks.
    Tuesday, July 17, 2012 2:21 PM
  • Changing security properties did not work for me. The CMD attrib/rd solution did. Thanks.

    Thanks for pointing that out.  I just noticed that my last post was incomplete.  The complete commands are:

    C:\> attrib -s -h -r "Program Files" /s /d

    C:\> rd /s /q "Program Files"

    If there are any reparse points (junctions or links) under "Program Files" you might need to also do:

    C:\> attrib -s -h -r "Program Files" /s /d /L

    I have also seen cases where the first rd /s /q came up with an error sech as "directory not empty".  But doing the rd /s /q a second time works.

    • Edited by Brian Borg Tuesday, July 17, 2012 7:40 PM
    Tuesday, July 17, 2012 7:35 PM
  • A lot of people seem to have trouble deleting this file and the flash10a.exe one. After trying an uninstaller, renaming the file and everything else I could think of I found a helpful post and wanted to pass on what finally worked for me (I was using an old XP machine BTW, not sure how it works with a newer OS).

    Get ready to smack yourself in the forehead like I did... drag the files into another folder... any folder... and THEN delete them. Hard to find an easier fix than that.
    Thursday, February 27, 2014 10:31 PM