locked
Deleting old ex-Windows files RRS feed

  • Question

  • I have installed Vista to a new drive and then plugged the old drive in. On the old drive, I still have a Program Files folder, which I am allowed to rename but not delete. I have deleted most of the contents of the folder, but some (eg the Windows Calendar, Windows Mail, Common Files etc) have been exceptionally stubborn.

    I have already taken ownership of the files and given rights to all users, although for some reason the "Creator Owner" entity does not retain any rights at all - they disappear as soon as they are applied.

    Edit : I can also rename and move the folder with no trouble. Just can't delete the stuff.

    Wednesday, October 6, 2010 7:34 AM

Answers

  • So I don't know exactly what changed in the last half hour, but after finding this solution a couple of weeks ago on a different site, I tried it again today - seems to have worked. It granted the proper permissions to all folders, although it didn't seem to work the first time I tried it.

    After taking ownership of the files as outlined above, I used the following command -

    icacls e:\blahblah\ /grant UserNameHere:(F) /T

    That didn't seem to work (No change at all), so I ALSO used -

    icacls e:\blahblah\ /grant UserNameHere:(D) /T

    to grant delete permissions, which full control should of course include but for some reason just wasn't working, permissions or not.

    • Marked as answer by Nephini Saturday, October 23, 2010 9:56 PM
    Saturday, October 23, 2010 9:56 PM

All replies

  • Hi,

    You may want to remove system files using Disk CleanUp.

    Delete files using Disk Cleanup
    ----------------------------------------

     

    The following procedure cleans up files associated with your user account. You can also use Disk Cleanup to clean up all the files on your computer.


    1. Open Disk Cleanup by clicking the Start button  . In the search box, type Disk Cleanup, and then, in the list of results, click Disk Cleanup.
    2. In the Drives list, click the hard disk drive that you want to clean up, and then click OK.
    3. In the Disk Cleanup dialog box, on the Disk Cleanup tab, select the check boxes for the file types that you want to delete, and then click OK.
    4. In the message that appears, click Delete files.

     

    If the issue persists, please boot in Clean Boot to remove them.

     

    Regards,

     

    Sabrina

     


    This posting is provided "AS IS" with no warranties or guarantees, and confers no rights. |Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Friday, October 8, 2010 8:29 AM
  • Thanks for your reply. However, it has not helped - the Disk Cleanup application only lists one item, Recycle Bin.
    Saturday, October 9, 2010 6:54 AM
  • Please check if there are any error message appeared when removing files.

     

    First, please go to restore your personal files:

     

    How to restore your personal files after you perform a custom installation of Windows Vista or of Windows 7

     

    After that, please go to take the steps in the following KB article to delete the old files:

     

    How to use the Disk Cleanup feature to delete the Windows.old folder after you install Windows Vista

     

    Also try this:

     

    Troubleshoot "access denied" when opening files or folders

     

    Hope it helps.

     

    Regards,

     

    Sabrina


    This posting is provided "AS IS" with no warranties or guarantees, and confers no rights. |Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Thursday, October 14, 2010 2:31 AM
  • No go - I do not have a Windows.old folder! and Disk Cleanup for this drive does not show ANY items in its' list other than Recycled Files.

    I have not installed 'over' an old copy of Windows - so Windows correctly does not register the files on the old drive as an old install. I have plugged an old drive, which previously had a copy of Windows installed (but which is no longer functional), in to an existing system.

    Also, "Troubleshoot "access denied" when opening files or folders" is not helping in this case, as I have already taken ownership of the files. I can open them, move them, rename them, anything except delete them.

    Thursday, October 14, 2010 12:25 PM
  • try renaming the program files folder then you have to take ownership of the individual folders under the program files folder for it to work.
    Tunde Abagun MCP,MCSA,MCTS,MCITP en p "for the love of Computers"
    Thursday, October 14, 2010 7:52 PM
  • Tried that too (individual sub-folders). They get the permissions listed, no problem, but they still won't let me delete. I've also tried it in safe mode. I'm almost at the point of buying another hard drive to transfer the 'keep' stuff to .. except I don't want to go that far! I should be able to delete stuff :)

    Edit - For clarification, I've also tried both giving ownership to my main user account, and giving it to the Administrators group, which that account is in. All user accounts have all permissions.

    Friday, October 15, 2010 7:07 AM
  • Found that user drtunababa is correct - I have to go down the tree to each individual sub-folder before I can delete it. However, given that I'm dealing with approximately 1,780 folders (23k files) I'm not keen on that. Also given this quote from the Windows Help files ..

    "Groups or users that are granted Full Control for a folder can delete files and subfolders within that folder, regardless of the permissions that protect the files and subfolders."

    BAH!!

    • Marked as answer by Nephini Saturday, October 23, 2010 9:56 PM
    • Unmarked as answer by Nephini Saturday, October 23, 2010 9:56 PM
    Saturday, October 23, 2010 8:30 PM
  • So I don't know exactly what changed in the last half hour, but after finding this solution a couple of weeks ago on a different site, I tried it again today - seems to have worked. It granted the proper permissions to all folders, although it didn't seem to work the first time I tried it.

    After taking ownership of the files as outlined above, I used the following command -

    icacls e:\blahblah\ /grant UserNameHere:(F) /T

    That didn't seem to work (No change at all), so I ALSO used -

    icacls e:\blahblah\ /grant UserNameHere:(D) /T

    to grant delete permissions, which full control should of course include but for some reason just wasn't working, permissions or not.

    • Marked as answer by Nephini Saturday, October 23, 2010 9:56 PM
    Saturday, October 23, 2010 9:56 PM
  • Great.The command-line speaks to the OS in ways that the GUI will only try to emulate.
    Tunde Abagun MCP,MCSA,MCTS,MCITP en p "for the love of Computers"
    Sunday, October 24, 2010 5:09 AM