20
11
My PC has a bunch of extra drives. Most of them contain old copies of Windows and Program Files. My PC is called "PC", and my admin user is called "Tim". I've assigned ownership of these second drives to the user "PC\Tim", and also given the user "PC\Tim" full control on the drives. I then try to delete either the Windows or Program Files folders on these drives, and get the message.
"You require permission from PC\Tim to make changes to this folder."
The current owner of these folders is listed as "Tim (PC\Tim)". The effective permissions for these folders lists this user has every right.
The absurd "answers" on the microsoft community of course offer things like "Use Disk Cleanup" (which is a blatantly uneducated answer) or "just reformat the drive" (formatting avoids the problem rather than addressing it).
What are the correct steps to delete these old files?
4For the
Windows
folder just rename it toWindows.old
and with the disk cleanup tool/ program you can simply delete it – SuperDJ – 2018-05-25T10:50:53.0272
Cacls
is now deprecated, please useIcacls
. – Tharindu Sathischandra – 2019-02-02T15:49:35.0701@Tharindu thanks, I updated the answer with icacls now. Please verify that it looks correct – Arne H. Bitubekk – 2019-02-22T13:47:13.000
1
rmdir
is nowrd
– RaisingAgent – 2019-11-10T01:14:18.200@RaisingAgent thanks for headups, I updated the code snippit with rd instead of rmdir – Arne H. Bitubekk – 2019-11-11T08:19:12.943