Removing C:\WINDOWS without reformat/repartitioning

Mullzy

Senior member
Jan 2, 2002
352
0
0
Time to rebuild XP again - I think I've managed to go a year this time. :D

Somehow I've accumulated way too much stuff to easily move to my D: drive so I can do a fresh reformat of C: before starting the OS installation. I'd like to do a fresh install of the OS without having to move most of this data.

Is there any easy way to remove the C:\Windows and C:\Program Files folder structures from the command prompt? In the past using a boot disk and doing it by hand was very, very slow and painful. iirc I couldn't delete entire trees at once, I had to go do the root of each folder and work my way back up. Also, because no memory/disk management utils are running these deletes take 100 times longer than if you were removing the same amount while in XP.

Any suggestions? Worst case scenario I burn all my data to DVD, but that will take probably 2 hours. =)
 

Mullzy

Senior member
Jan 2, 2002
352
0
0
My D: drive is chalk full of stuff as well... that's the problem. I can back a bunch of stuff up or just buy a new drive, but I'm looking for a way around doing that.
 

timswim78

Diamond Member
Jan 1, 2003
4,330
1
81
Maybe you could boot from a Live Linux CD and delete the unwanted folders. Then install Windows.
Also, if you can afford it, I would really suggest backing up your data to DVD's or to another hard drive. It is amazing how quickly it can all disappear.
 

htne

Platinum Member
Dec 31, 2001
2,360
0
76
you can remove an entire tree from the command line.
RMDIR /S C:\WINDOWS

RMDIR /S "C:\PROGRAM FILES"
These two commands will do the trick after you boot from the Windows XP CD and go to the recovery console.
 

WobbleWobble

Diamond Member
Jun 29, 2001
4,867
1
0
You can do what htne suggested if you want to delete the folders.

If you want to rename, also boot from the XP CD, go to Recovery Console then use the "ren" command to rename WINDOWS to WINBACK or something like that.
 

Mullzy

Senior member
Jan 2, 2002
352
0
0
Originally posted by: Tom
chock

LOL... yeah I thought something looked wrong there.

htne - thanks man. Any idea who long that actually takes? I'm hoping booting from the CD and entering the recovery console will load some sort of memory/file/cache management.
 

silverpig

Lifer
Jul 29, 2001
27,703
12
81
I vote for linux liveCD. I buggered up the g/f's hard drive (she had some messed up stuff on there that stopped my xp upgrade from 98 for her dead and left a black screen), and she wanted some files still. I put it in my computer as a slave drive but that didn't work either. Started up with a linux livecd, mounted my drive and hers, copied over whatever I wanted, unmounted, pulled her drive out, it's now formatting in her new(ish) computer.
 

Mullzy

Senior member
Jan 2, 2002
352
0
0
Originally posted by: htne
you can remove an entire tree from the command line.
RMDIR /S C:\WINDOWS

RMDIR /S "C:\PROGRAM FILES"
These two commands will do the trick after you boot from the Windows XP CD and go to the recovery console.

Ack... I'm getting "invalid parameter" using rmdir /s c:\windows

Thoughts?
 

Mullzy

Senior member
Jan 2, 2002
352
0
0
I am also getting "access is denied" in trying to rename the \Program Files folder. I was able to rename C:\Windows just fine but nothing else works.
 

htne

Platinum Member
Dec 31, 2001
2,360
0
76
Originally posted by: Mullzy
I am also getting "access is denied" in trying to rename the \Program Files folder. I was able to rename C:\Windows just fine but nothing else works.


Did you boot from the Windows XP install cd, and choose to go to the Recovery Console?

If you boot from the hard drive, then of course it won't work.
 

magomago

Lifer
Sep 28, 2002
10,973
14
76
Those who vote for Linux live cd...that will only let him read/copy files. I wouldn't even trying writing on a NTFS drive outside of windows

But yeah if you have a DVD burner, or even a CD burner and its been a year, now would be perfect to toss in a LIVE cd and burn the files you want
 

dclive

Elite Member
Oct 23, 2003
5,626
2
81
Originally posted by: htne
Originally posted by: Mullzy
I am also getting "access is denied" in trying to rename the \Program Files folder. I was able to rename C:\Windows just fine but nothing else works.


Did you boot from the Windows XP install cd, and choose to go to the Recovery Console?

If you boot from the hard drive, then of course it won't work.

He can't do it because that's the default in Recovery Console - you can only modify inside of C:\Windows. He needs to edit his local security policy (as you have, apparently) to allow access outside of c:\windows from the recovery console.

OP: To do this: Start/Run GPEDIT.MSC; - ComputerConfig/WindowsSettings/SecuritySettings/LocalPolicy/SecurityOptions/Rec
very Console: Allow... --- turn both to on or yes...

 

Mullzy

Senior member
Jan 2, 2002
352
0
0
Yes I was using the recovery console. It wouldn't let me delete anything and I could only rename C:\Windows (which I renamed back eventually and gave up for the weekend).

dclive -- thanks. Looks like I'll give that a try. Will that enable me to do the rmdir /s ? Or just rename any folder I desire?

Thanks again.
 

dclive

Elite Member
Oct 23, 2003
5,626
2
81
M - you can then delete whatever you want using any commands you want, any way you want, via the RC.
 

Mullzy

Senior member
Jan 2, 2002
352
0
0
Ah, apparently the policy editor is only available for XP Pro; I have Home.

Anyone know the alternate way to set this just using the registry?
 

Mullzy

Senior member
Jan 2, 2002
352
0
0
This seemed to work... I was able to use the "SET AllowAllPAths = TRUE" after I changed the value of "SetCommand" from 0 to 1 in the following registry entry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Setup\RecoveryConsole

 

fr

Diamond Member
Oct 10, 1999
6,408
2
81
If you have another computer, take out the HD and put it in that machine as slave. You can delete the Windows folder from within Windows.