2

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.

1

3 Answers 3

2

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.

2
  • takeown gives me an ERROR: System couldn't find the specific file, and I'm runnig CMD as Administrator
    – Laci K
    Jan 20, 2013 at 17:56
  • 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
    – Laci K
    Jan 20, 2013 at 18:12
0

What OS are you using? Windows 8?

This can either be a permission problem or a locking problem.

In the first case, go to the folder Properties, then Security and check if your user account or Everyone can delete the folder (Full control and/or Modify are checked). If not add it.

If it's a locking problem, on XP I used to have WhoLockMe to see which software was locking the folder and then kill the process. I don't know if it works on 7, I haven't tried, but alternatively you can install Process Explorer, or Unlocker (which) works on 7 for sure).

If this doesn't help the folder might be corrupted on the file system, in which case I would suggest to first run a chkdsk. If this doesn't solve, you might want to try booting from a live linux distribution, mounting the NTFS partition and try deleting it from there.

The last option sounds scary, especially if the file system itself is not in good state.

Can you leave the folder there?

2
  • 1
    his question is tagged as "windows 8" so i guess, yea. Jan 20, 2013 at 17:15
  • 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
    Jan 20, 2013 at 17:53
0

I much recommend Unlocker application that have "force delete" function (with SYSTEM account rights service). After install, click file/folder, press Del as usual in Windows Explorer, and--if file/folder is locked--special window should appear with advanced actions dialogue.

But if lock attached to other user, try Jake's answer first.

2
  • I will give it a try, but shouldn't the Windows inbuilt Disk Cleanup run with SYSTEM rights?
    – Laci K
    Jan 20, 2013 at 17:59
  • 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.
    – Dima Zorin
    Jan 20, 2013 at 19:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .