How do I delete the Windows folder?

maniac5999

Senior member
Dec 30, 2009
498
2
81
So, I'm on win7 x64. About 6 months ago I bought a cheap SSD (128gb Kingston V100) and relegated my 1tb Spinpoint F1 to media drive duty. At this point it's about 90% full, and i'm thinking about how to get more space on it without buying a new HDD. (stupid Thai flooding)
Anyway, I basically just set the computer to bood from the SSD and installed a fresh copy of win7 on there, and now I'm wondering if there's a way for me to delete the 25GB windows folder from the F1 to free up more space?
 

Bubbaleone

Golden Member
Nov 20, 2011
1,803
4
76
.....and now I'm wondering if there's a way for me to delete the 25GB windows folder from the F1 to free up more space?

At the command prompt: <drive letter>\<path> rmdir /S /Q <directoryname> will recursively, silently(no confirmation prompts), and permanently (no recycle bin) delete all folders and files
 
Last edited:

maniac5999

Senior member
Dec 30, 2009
498
2
81
So, if the drive's currently labeled E, and the Windows folder is immediately inside E I would type in:
<E>\rmdir/s/q<windows> to delete the folder?
 

Bubbaleone

Golden Member
Nov 20, 2011
1,803
4
76
So, if the drive's currently labeled E, and the Windows folder is immediately inside E I would type in:
<E>\rmdir/s/q<windows> to delete the folder?

The arrows are typically used as a place holder and just indicate a relative location.

I don't know your drives file structure so <drive letter>\<path> could simply indicate C:\Program Files, as an example.


If the Windows folder is at the root of "E:" ( E:\Windows ), then this his is how the command should look:

 
Last edited:

maniac5999

Senior member
Dec 30, 2009
498
2
81
Clearly I'm not getting to the command prompt with high enough level access. I'm searching for it in the search menu, and selecting "run as administrator", and starting out with C: \windows\system32> and when I try to do the commands, I get a scrolling list of files in the folder followed by "access is denied" when I input the command.

Just FYI, I'm on win7 x64. I can see you're using XP, I'm not sure if it makes a difference
 
Last edited:

Bubbaleone

Golden Member
Nov 20, 2011
1,803
4
76
Clearly I'm not getting to the command prompt with high enough level access. I'm searching for it in the search menu, and selecting "run as administrator", and starting out with C: \windows\system32> and when I try to do the commands, I get a scrolling list of files in the folder followed by "access is denied" when I input the command.

Just FYI, I'm on win7 x64. I can see you're using XP, I'm not sure if it makes a difference

It's cool...command prompt is the same. You haven't confirmed that E:\Windows is the actual location of the folder you want to delete. I'll assume it is.

You have to run the command from the root of the folders location, whether it's a folder within a folder or a folder at the root of a drive. Are you in the correct place when you run the command?

If C:\Windows\System32 is where your command prompt opens at, and E:\Windows is the folder you want to delete, then your command syntax should look like this:





If this is what you are doing and you're still getting "access denied" message, then you'll have to take ownership of the folder and give yourself Administrator access rights before you'll be able to delete it.
 
Last edited:

Bubbaleone

Golden Member
Nov 20, 2011
1,803
4
76
Enable the Built-in Administrator Account on Windows 7

First you&#8217;ll need to open a command prompt in administrator mode by right-clicking and choosing &#8220;Run as administrator&#8221; (or use the Ctrl+Shift+Enter shortcut from the search box). Now type the following command:

net user administrator /active:yes

You should see a message that the command completed successfully. Log out, and you&#8217;ll now see the Administrator account as a login choice.

Disable the Built-in Administrator Account on Windows 7

Make sure you are logged on as your regular user account, and then open an administrator mode command prompt as above. Now type the following command:

net user administrator /active:no

The administrator account will now be disabled, and shouldn&#8217;t show up on the login screen anymore.

Important Note: Don't ever use the built-in Administrator account for anything other than situations like this,where you need unrestricted access. Disable this account as soon as you've completed your tasks.
 
Last edited:

Absolution75

Senior member
Dec 3, 2007
983
3
81
While I won't go into specific detail for each step, this will work:

Take ownership of the windows folder you want to delete, do it recursively to all subfolders.
Remote all access to all users, add your own user as the only person with access (give youself full access). Recursively replace folder permissions with the root permissions. Do not inherit permissions. Apply these permissions to all subfolders and files.

Go into the windows folder itself and try to delete all the files. You'll likely have some you can't delete for various reasons (DRM, files could be in use, etc). You'll have to deal with those individually, but 99% of the files will be gone, if not all of them.
 

maniac5999

Senior member
Dec 30, 2009
498
2
81
It's cool...command prompt is the same. You haven't confirmed that E:\Windows is the actual location of the folder you want to delete. I'll assume it is.

You have to run the command from the root of the folders location, whether it's a folder within a folder or a folder at the root of a drive. Are you in the correct place when you run the command?

If C:\Windows\System32 is where your command prompt opens at, and E:\Windows is the folder you want to delete, then your command syntax should look like this:


If this is what you are doing and you're still getting "access denied" message, then you'll have to take ownership of the folder and give yourself Administrator access rights before you'll be able to delete it.

The file is e:\windows, and I've managed to create the administrator account, but I still get the access denied message.

EDIT: damnit, how do I turn off smileys again?
 
Last edited:

maniac5999

Senior member
Dec 30, 2009
498
2
81
LOL...scroll down below the text editor and check "disable smilies in text", before you post.

This is a good tut with step by step details: How to Take Ownership and Gain Full Control Permissions in Windows


Thanks for the smilies bit. unfortunately, that's the only bit that worked. I gave myself as much control as I could in the advanced tab before my first post. I went thru the first set of steps, and it said I had full control, but basically said that it couldn't apply to any sub-folders.
 

gevorg

Diamond Member
Nov 3, 2004
5,075
1
0
boot via Knoppix live CD and go from there, Linux can delete anything
 

Bubbaleone

Golden Member
Nov 20, 2011
1,803
4
76
Thanks for the smilies bit. unfortunately, that's the only bit that worked. I gave myself as much control as I could in the advanced tab before my first post. I went thru the first set of steps, and it said I had full control, but basically said that it couldn't apply to any sub-folders.

Study that tut again. You have to perform all the steps to have recursive "Full Control" Administrator permissions. I'll lay it out here:

Enable the built-in Administrator account (see previous post) from your regular account, logoff, then login as Administrator.

Open the "Folder Options" dialog box. click the "View" tab, and select the following:


  • Uncheck: "Display simple folder view in Explorer's Folder list"

  • Check: "Show hidden files and folders"

  • Uncheck: "Hide extensions for known file types"

  • Uncheck: "Hide protected operating system files"

  • Uncheck: "Use simple file sharing"
Now, click the "Apply to ALL Folders" button, then click "Apply", and click "OK" to exit the dialog box.

Navigate to the Windows folder you want to access:


  • Right-click that folder and from the drop-down menu select "Properties". The folder properties dialog box opens.

  • Click the "Security" tab then click the "Advanced" button. The "Advanced Security Settings" dialog box opens.

  • Under "Permission entries:" you'll see a list of names. Be sure that "Administrator" and/or "Administrators" are listed with "Full Control" permission that apply to "This folder, subfolders, and files". If "Administrator" isn't listed, add it.

  • Now, click the "Owner" tab. You'll see the "Current owner of this item": "Administrator" and "Administrators" should be listed. Change owner to "Administrator".

  • Check the box: "Replace owner on subcontainers and objects", then click the "Apply" button. A small progress window may open, then will close automatically when finished.

  • Click the "Permissions" tab again. Now, check the box: "Replace permission entries on all child objects with entries shown here that apply to child objects", then click "Apply". A small progress window may open, then will close automatically when finished.

  • Click "OK" to close the "Advanced Security Settings" dialog box.

  • Click "OK" to close the folder properties dialog box.

You'll now have Full Control permissions on the Windows folder and all it's contents. If you want full control of an entire drive; right click on the drive letter itself and apply this same procedure, logged in as built-in Administrator.
 
Last edited:

maniac5999

Senior member
Dec 30, 2009
498
2
81
I logged into the admin. account.
*I couldn't find a "Display simple folder view in the options" box to uncheck
I proceeded from there as instructed.
when I try to check the full control box, it starts with an error has occurred "E:\windows\addins Access is denied. then it says the same thing for E:\windows\appPatch... and everything else in there.
 

Bubbaleone

Golden Member
Nov 20, 2011
1,803
4
76
Try setting Administrator as owner, first (per instructions). When that completes, then give Administrator full control.
 

maniac5999

Senior member
Dec 30, 2009
498
2
81
no luck, I already had it set with my user account as owner. when I switched it to administrator the 'access denied' when assigning full control goes away, but i still get the error when trying to delete it via command line.
 

Bubbaleone

Golden Member
Nov 20, 2011
1,803
4
76
no luck, I already had it set with my user account as owner. when I switched it to administrator the 'access denied' when assigning full control goes away, but i still get the error when trying to delete it via command line.

OK,...download this zip to the desktop and extract the batch file:

http://www.enoctis.net/shared/Win7_File-Permissions.zip

In order to properly set file permissions this batch file has to be in the folder that is to be modified; copy it to the Windows folder.

Navigate to the Windows folder, right-click this file, and choose "Run as administrator" from the context menu.

Be patient, this will take some time to complete

If you encounter problems running the batch file from the Windows environment, run it from the command prompt in the WinRE:

How to use the Windows 7 System Recovery Environment Command Prompt

When you get to the WinRE command prompt the commands you type (in black) will look like this:

X:\Sources>cd /d E:\Windows

E:\Windows>Win7_File-Permissions

When you press Enter the "Win7_File-Permissions" batch file will run.

When that finishes running you can run the RMDIR command from there as well.

.
 

LokutusofBorg

Golden Member
Mar 20, 2001
1,065
0
76
If you left your data drive in when you were reinstalling onto your new SSD there's a *chance* that your Windows installation is split across your drives now. Just throwin' that out there.

The [ noparse ] tag lets you put stuff like E:\Windows in a post without disabling smileys.
 

LokutusofBorg

Golden Member
Mar 20, 2001
1,065
0
76
Are you guys saying that in response to me?

All I'm saying is that reading through this thread the OP has not said anything that makes me sure he installed to his SSD properly. There's a possibility that he's booting to his E: drive, which is why it isn't letting him delete the Windows folder on that drive.

If you leave your data drive in when you're installing, there's a chance to choose the wrong partition to install to.

If you don't have your BIOS configured correctly, there's a chance you're booting into your old installation.

Either of those could make it so you can't delete the Windows folder on a different drive.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |