2

On my alternate drive, G, there is a hidden $Recycle.Bin directory with 32 Gigs of files that can not be deleted.

Opening CMD as administrator and running rd /s /q G:\$Recycle.Bin does not work. Every file gives a message:

access is denied.

I cannot change ownership of the directory to 'Users' as specified in these instructions., every file gives a dialog message of:

Failed to enumerate objects in the container. Access is denied.

Giacomo1968
  • 58,727

2 Answers2

1
takeown /a /r /d N /f G:\$Recycle.Bin
icacls G:\$Recycle.Bin /grant Administrators:(F) /t

Takeown will assign the folder to the administrators group. Icacls gives administrators full control. You must be elevated. Only admins can take ownership. Only the admin user logged in or the administrators group can take actual ownership.

Admins have a special power of taking ownership.

Owners have a special power of editing the security permissions even if they don't have permission to do so.

Windows has an assumption that Admins operate on behalf of all admins unlike users who are considered as unrelated individuals. So if an elevated administrator creates a file the owner is the Administrators group. This is controlled by a setting in Security Options (not in Home).

PS Every user has their own subfolder in each recycle bin. You have one Recycle Bin per drive.

0

1- Open cmd as administrator

2- Type the following commands:

takeown /a / r /d N /f G:\$Recycle.Bin

icacls G:$Recycle.Bin /grant Administrators:(F) /t

rd /s /q G:$Recycle.Bin

The first command will take ownership The second will give the administrators group full permissions The last will delete the folder and its contents