blksith0

Extraordinary Member
Joined
Oct 24, 2012
Messages
61
Situation: Secondary HDD contains previous installation's Windows folder which my current Win10 account cannot delete even as admin.
Solution: I'm assuming that I'd need to first take ownership then change the permissions to give full control.

However this is an old hard drive, and since my goal is to delete the whole folder, there must be a better way to do it without traversing the entire thing at least twice to modify attributes.
Can I simply forcefully delete it from within Windows or can I boot into linux or a recovery CD and do it that way?
 

Solution
You can remove the directory from an elevated command prompt with three commands
  • First open the elevated commmand prompt by right clicking 'Command Prompt' and select 'Run as Administrator'
  • Take ownership of the directory with takeown /f <path to directory> /r
  • Grant full access to the administrators group with cacls <directory name> /t /e /g administrators:f
  • Delete the directory rmdir <directory name> /s /q

ussnorway

Windows Forum Team
Staff member
Joined
May 22, 2012
Messages
4,596
the sure way to remove an windows.old file from the other drive is to format the drive... taking ownership is not enough
 

blksith0

Extraordinary Member
Joined
Oct 24, 2012
Messages
61
I'm not going to format the entire drive to delete one single folder on the drive.
 

BIGBEARJEDI

Excellent Member
Premium Supporter
Joined
Jan 28, 2013
Messages
2,419
You may wish to try using the free LockHunter utility to remove the Windows.old folder. It's worked for me on some computers--but, not all as Norway mentions. It's also unlocked the $WINDOWS.~BT folder as well, which is the 2nd of 3 W10 reversion folders out there.

Good Luck!:eagerness:
<<<BIGBEARJEDI>>>
 

Neemobeer

Windows Forum Team
Staff member
Joined
Jul 4, 2015
Messages
8,998
You can remove the directory from an elevated command prompt with three commands
  • First open the elevated commmand prompt by right clicking 'Command Prompt' and select 'Run as Administrator'
  • Take ownership of the directory with takeown /f <path to directory> /r
  • Grant full access to the administrators group with cacls <directory name> /t /e /g administrators:f
  • Delete the directory rmdir <directory name> /s /q
 

Solution

blksith0

Extraordinary Member
Joined
Oct 24, 2012
Messages
61
You can remove the directory from an elevated command prompt with three commands
  • First open the elevated commmand prompt by right clicking 'Command Prompt' and select 'Run as Administrator'
  • Take ownership of the directory with takeown /f <path to directory> /r
  • Grant full access to the administrators group with cacls <directory name> /t /e /g administrators:f
  • Delete the directory rmdir <directory name> /s /q
Yes, that's the same thing I suggested in my OP, take ownership -> change permissions -> delete, but it's so inefficient compared to just skipping to the last step and deleting it.

Alright first I'm going to try and boot use the recovery console to delete it, if that doesn't work then a linux OS will surely let me.
 

MikeHawthorne

Essential Member
Microsoft Community Contributor
Joined
May 25, 2009
Messages
6,671
Hi

If you are trying to remove the Windows.old folder you can do it with CCleaner.
It will remove it if you check the box before running it, if you don't have a windows.old folder then there won't be an entry for it.

If you are trying to remove a previous install on another drive one way is to boot your computer to a Ubuntu disk and use that to delete the file.

Be careful, if the Windows install is in your boot menu, and you delete it your computer won't boot afterwards unless you remove the Windows install from the boot list first.

You can do that with EasyBCD, I'd at least run it to be sure that the Windows on the second drive isn't on the boot list.
If you only see the Windows install on the drive you are booting to on the list then it should be safe to delete it.

EasyBCD

Download the free one.

Mike
 

Neemobeer

Windows Forum Team
Staff member
Joined
Jul 4, 2015
Messages
8,998
Booting into a live Linux disc would be the quickest and would be the only way you could flat out delete the directory.
 

blksith0

Extraordinary Member
Joined
Oct 24, 2012
Messages
61
I used the windows install disk to use the terminal to run your "rd" command. Then did a little defrag while I was there.

And to you guys up there ^, don't assume "Windows.old". I was referring to an old Windows folder from a previous install that I had backed up. Slightly different.
 

Back
Top