Can't delete folder from old Windows installation not even with disk cleanup

6,251

Try opening an admin CMD, then typing:

takeown /f "F:\Windows.old\ProgramData\Microsoft\Windows\Start Menu\Programs\325 USB PC Camera"

before removing the folder. It should give you the permissions to delete the folder.

See microsoft's page on takeown

NOTE: After deleting the lock with takeown, you might have to use Windows Explorer or the cacls command to give yourself full permissions to the files and directories before you can delete them.

Share:
6,251

Related videos on Youtube

Laci K
Author by

Laci K

Updated on September 18, 2022

Comments

  • Laci K
    Laci K over 1 year

    I'm trying to delete a old Windows folder from my old HDD but I always get access denied for an old USB camera's ProgramData folder (with Admin CMD) and not even the the Disk Cleanup was able to delete it. If I watch the properities of the folder under security settings I see only an error message what says Security settings are not available or can't be displayed.

    This is the full path for the folder I'm trying to delete:

    F:\Windows.old\ProgramData\Microsoft\Windows\Start Menu\Programs\325 USB PC Camera

    So what can I do to remove that folder? Format is not an option since I have more than 50GB data on that drive which is important.

    • Lorenzo Von Matterhorn
      Lorenzo Von Matterhorn over 11 years
      boot using a linux distro, then remove it.
  • Lorenzo Von Matterhorn
    Lorenzo Von Matterhorn over 11 years
    his question is tagged as "windows 8" so i guess, yea.
  • Laci K
    Laci K over 11 years
    Yes I use Win 8 and the old Win was Win 7 and as I wrote under the security tab is only a message which says sec. settings can't be displayed.
  • Laci K
    Laci K over 11 years
    I will give it a try, but shouldn't the Windows inbuilt Disk Cleanup run with SYSTEM rights?
  • Laci K
    Laci K over 11 years
    Ok, Success I did a recursive takeown on the Programs folder and than I removed the Program folder with rd and finally I was able to delete the Windows.old folder :) thank you
  • Dima Zorin
    Dima Zorin over 11 years
    I don't know exact account, I analyze only Unlocker code. But as I think Disk Cleanup not intended to remove other users files and should prevent this as any good OS included software. And as opposite Unlocker was created to manage any files or folders especially in specific situations. Without need to type console commands and with user friendly interface.