Deleting Old OS off another HDD

Amaze904

Honorable
Mar 12, 2013
158
0
10,680
OK- I am attempting to delte an old win7 installation off an old harddrive because I dont have a HDD large enough to save the data I do want to keep on it-

I've tried taking ownership 100 times- though when I go to delete the folders- it says I do not have permission.

I just want to use it as storage- but I cant with all the programs on it taking up so much space.

Is there a way to delete everything off except what I want to save? ( around 200GB of data on a 1TB HDD)
 
Solution
Execute this from elevated command prompt on folder you want to delete:
(replace c: with correct drive letter and foldername with correct folder name)
  • takeown /f c:\foldername /r
    icacls c:\foldername /reset /t
If foldername contains spaces, then use double quotes like this:
  • takeown /f "c:\foldername with spaces" /r
After that, you'll be able to delete the folder.
Execute this from elevated command prompt on folder you want to delete:
(replace c: with correct drive letter and foldername with correct folder name)
  • takeown /f c:\foldername /r
    icacls c:\foldername /reset /t
If foldername contains spaces, then use double quotes like this:
  • takeown /f "c:\foldername with spaces" /r
After that, you'll be able to delete the folder.
 
Solution

Amaze904

Honorable
Mar 12, 2013
158
0
10,680
can i do that to the whole drive- when taking ownership previously- it kept throwing ownership errors for like 15 folders- saying unable to take ownership; would i have to use cmd to do that for all the folders i was unable to take ownership for?

-forgive me im a bit hesistant to do anythign in ccmd as last time i did that on here following someones advise- it resulted in a bricked windows and i was forced to reinstall from scratch
 

Amaze904

Honorable
Mar 12, 2013
158
0
10,680
Did you not read ANYTHING?


I stated i am attempting to save about 200 gb of data on it, but do not have another hdd to copy that to......i even wrote in all caps so you couldnt miss it lol
 
Execute those commands only on folders you want to delete.
Do not execute them on folders of your current C: drive or that will mess up your OS.
These commands change settings on specified folder and all sub-folders.
Old windows files are located in folders:
  • \Program Files
    \Program Files (x86)
    \Program Data
    \Users
    \Windows
 

You get to elevated command prompt by right-clicking on windows logo button:
Administrator-Command-Prompt_thumb.png

Command-Prompt-as-administrator_thumb.png
 



I saw it first time - - I edited my post to reflect that so keep your starched shirt on buddy.

Geez, buy a hard drive then, even an external one. 200GB is easy to back up - - you can get a 1TB external drive over here for 40 quid so it'll be considerably less if your stateside.

That's all I have to say if you're the sarcastic type easily offended et. etc. - - I don't go there.
 

Amaze904

Honorable
Mar 12, 2013
158
0
10,680
Not offended- just astounded that your solution would be "go buy another HDD" - instead of finding a solution to salvage one i already have lol

I do back up my HDD but with 6 TB of data being used on others, didnt have space to pull the data i wanted to save on this one- thought doing somethimg like deleting an OS would be EASIER and CHEAPER then just buying more HDD's lol
 

Amaze904

Honorable
Mar 12, 2013
158
0
10,680

i dont unnnderstand the double spaces thingn though

i tried:

takeown /f j:\Program Files r/
and
takeown /f "j:\Program Files" r/
 

Amaze904

Honorable
Mar 12, 2013
158
0
10,680
mid way through- i got an "takes ownership of a file has stopped working" lol

nevermind- just had to run it several times for it to get them all

though i did get this after it was all sadi and dont from ccmd

ERROR: The filename, directory name, or volume label syntax is incorrect.
 

USAFRet

Titan
Moderator
In a situation like this, there are a few things to know:
1. How large is the data set you wish to 'save'
2. Where, exactly is this data...what folders? If it is stuck inside /User/OldGuy/Documents...that brings extra hassle
3. How much free space is on the drive?


So.....
Defrag the drive
Shrink the relevant partition to free up enough space
Create a new partition in the newly created blank space
Copy all of that 'data' to this new partition.
Once done, delete all the other partitions.

Messing with partitions always brings the possibility of hosing up the whole drive and losing everything anyway.

Or do it the smart way, and obtain another drive.
Once you're done with this data copying and killing off the partitions on the 1TB...you now have a drive for actual backups.
Which you should have anyway.