Deleting a Windows folder on a secondary HDD

TommyTheTank

Honorable
Apr 5, 2016
129
0
10,760
I put an old HDD into a new computer, it has about 700gb of data on it.
It used to be my main drive and has a windows installation on it.
I don't want to format it because backing up that 700gb would be a pain.

I want to free up some space so i tried to delete the Windows folder that it has but Windows thinks they are protected system files. I will never use that installation of windows again and want to free up the 20gb or so that the folder takes,
Disk Cleanup doesn't recognize the windows folder on that drive as an old installation of windows

Is there anyway to delete it without having to download and install a 3rd party tool?
Thanks
 
Solution
Try this:
Run Disk Cleanup from start and select Previous Windows Installation(s) then press Ok

if it doesn't help then try this:
Open CMD as Administrator
Change Z with the drive where the folder is.
Change Program files with the folder you want to delete

takeown /F "Z:\Program Files\" /A /R /D Y
cacls "Z:\Program Files\*.*" /T /grant administrators:F
rmdir /s /q "Z:\Program Files\"


Or

https://technet.microsoft.com/en-us/library/cc753659.aspx

Peace.

VJ_Gamer

Commendable
Aug 8, 2017
851
0
1,660
Try this:
Run Disk Cleanup from start and select Previous Windows Installation(s) then press Ok

if it doesn't help then try this:
Open CMD as Administrator
Change Z with the drive where the folder is.
Change Program files with the folder you want to delete

takeown /F "Z:\Program Files\" /A /R /D Y
cacls "Z:\Program Files\*.*" /T /grant administrators:F
rmdir /s /q "Z:\Program Files\"


Or

https://technet.microsoft.com/en-us/library/cc753659.aspx

Peace.
 
Solution

TommyTheTank

Honorable
Apr 5, 2016
129
0
10,760
I used takeown and icacls then just deleted it normally with shift+delete in file explorer which worked perfectly, finally got rid of that windows folder

Im saving those commands as they could be helpful to me in the future, there have been so many times when i just want to take ownership of a folder and windows is a pain in the ass about it

Thanks