Windows 7 Forums


Windows 7: Disk Cleanup : Extended


Disk Cleanup : Extended

How to Use Extended Disk Cleanup in Windows 7
Published 05 Apr 2010
Published by

Featured Tutorial

User Profiles - Create and Move During Windows 7 Installation
User Profiles - Create and Move During Windows 7 Installation

How to Create User Accounts on another Partition or Disk During Windows 7 Installation

Microsoft Account "Two-step Verification" - Turn On or Off
Microsoft Account "Two-step Verification" - Turn On or Off

How to Turn "Two-step Verification" On or Off for your Microsoft Account

Restore Point - Add "Create Restore Point" to Context Menu in Windows
Restore Point - Add "Create Restore Point" to Context Menu in Windows

How to Add "Create Restore Point" to Context Menu in XP, Vista, Windows 7, and Windows 8

Microsoft Account Primary Alias Email Address - Change
Microsoft Account Primary Alias Email Address - Change

How to Change your Microsoft Account Primary Alias Email Address

Portable OS - Carry your OS on an External Drive
Portable OS - Carry your OS on an External Drive

How to Create a Portable OS on an External Drive

Safe Internet Browsing
Safe Internet Browsing

How to safely operate on the internet and stay free from malware infections
How to Use the Extended Disk Cleanup Feature in Windows 7

This will show you how to access and run the Extended Disk Cleanup function in Windows 7, allowing you to clean up more HDD space for you to use.

Note   Note

This must be done in an elevated command window to complete.



Let's get started!

1) In the Windows 7 start menu search box type "cmd" (without the quotes) right click the entry and select "Run As Administrator" then enter your user credentials for the UAC prompt and click yes to open the command window.
Disk Cleanup : Extended-cmd-runas.jpg
Disk Cleanup : Extended-cmd-uac.jpg
2) In the command window that opens type the command below and hit enter.

Be advised: the command window must be left open while the cleanup is carried out.

Code:
%SystemRoot%\System32\Cmd.exe /c Cleanmgr /sageset:65535 & Cleanmgr /sagerun:65535

Disk Cleanup : Extended-cmd-text.jpg

3) Now you will see the Disk Cleanup Settings window with more options available to you, select the ones you want to clean up then click ok; wait for the search and then the cleanup and then you're done.
Disk Cleanup : Extended-disk-cleanup.jpg
Disk Cleanup : Extended-checking.jpg
Disk Cleanup : Extended-cleaning.jpg
To add a shortcut to the desktop.

Note   Note

This .bat file was created by CarlTR6 credit for this goes to him!


1) In the Windows start menu search box type "notepad" (without the quotes) right click the entry and choose Run as Administrator then enter your user credentials in the UAC prompt and click yes to open notepad.
Disk Cleanup : Extended-notepad-runas.jpg
Disk Cleanup : Extended-uac-notepad.jpg
2) In notepad type the code below then in the upper left of notepad at File select "Save as" name the file anything you want but it must have the .bat extension then browse to C:/Windows/System32 and click Save, then back at "File" click "Exit" to close notepad.
Code:
 cd C:\windows\system32 
%SystemRoot%\System32\Cmd.exe /c Cleanmgr /sageset:65535 & Cleanmgr /sagerun:65535
Disk Cleanup : Extended-carls.jpg
Disk Cleanup : Extended-carls1.jpg
Disk Cleanup : Extended-carls2.jpg
3) Now click an empty spot on the desktop and click, "New, Shortcut" in the "Create Shortcut" window browse to C:\Windows\System32\<your file name.bat> and click ok, then in the next window click next, then for the last "Choose Name" window name the shortcut whatever you want (I chose something clever, "Clean") then click "Finish" to add the shortcut to the desktop, you're done.
Disk Cleanup : Extended-carls6.jpg
Disk Cleanup : Extended-carls7.jpg
Disk Cleanup : Extended-carls8.jpg
Disk Cleanup : Extended-name.jpg
Disk Cleanup : Extended-clean.jpg
Enjoy!





Need more help? Try searching our extensive help and support site.
Loading
05 Apr 2010   #1
CarlTR6

Windows 7 Ultimate 32 bit
Orlando, Florida
 
 

Thanks BFK; it worked well. I need to create a batch file for this.

My System SpecsSystem Spec

05 Apr 2010   #2
Bare Foot Kid

W 7 64-bit Ultimate
The Lowcountry
 
 

Thanks Carl, if you want to post the .bat for others, feel free.
My System SpecsSystem Spec
05 Apr 2010   #3
CarlTR6

Windows 7 Ultimate 32 bit
Orlando, Florida
 
 

I created the batch file in Notepad and named it clean.bat. The name does not matter; you can name it anything you wish as long as you give it the .bat extension.

Open Notepad. copy and paste the two lines below into Notepad.

cd C:\windows\system32
%SystemRoot%\System32\Cmd.exe /c Cleanmgr /sageset:65535 & Cleanmgr /sagerun:65535

Click on File and select Save as...

Type the file name and give it the .bat extension.

Select All files (*.*) and click Save.

Once I saved the file I moved it from the Documents folder to the Windows> System32 folder. The path on my computer is C:\Windows\System32.

To run the batch file and the program, open cmd as an administrator and type "clean" or whatever you named the file (without the quotation marks) at the prompt and hit Enter.

Last edited by CarlTR6; 05 Apr 2010 at 08:37 PM.. Reason: Corrected a typing error.
My System SpecsSystem Spec
.


05 Apr 2010   #4
Bare Foot Kid

W 7 64-bit Ultimate
The Lowcountry
 
 

Cool, thanks Carl.
My System SpecsSystem Spec
05 Apr 2010   #5
CarlTR6

Windows 7 Ultimate 32 bit
Orlando, Florida
 
 

You are welcome. I hope it helps someone.
My System SpecsSystem Spec
05 Apr 2010   #6
severedsolo

Windows 7 Ultimate X64 SP1
Cromer Norfolk UK
 
 

carl and BFK great work, i would rep you, but apparently i havent repped enough people yet to make it work

carl i think your batch file is slightly wrong, i get "the filename directory name or volume syntax is incorrect" it still works because it has defaulted to C:\windows\system 32 anyway but on the first line, rather than "cd\C:\windows\system 32" shouldnt it be "cd c:\windows\system 32 (with a space instead of the slash)
My System SpecsSystem Spec
05 Apr 2010   #7
derekimo

Windows 7 Pro 64 SP1
East Bay Area, CA
 
 

Thanks Ted and Carl, Nice Work!
+rep For both of you.
Derek

Thanks severedsolo also for spotting that.

The new one works perfect Carl.

Last edited by derekimo; 05 Apr 2010 at 08:48 PM.. Reason: updated
My System SpecsSystem Spec
05 Apr 2010   #8
CarlTR6

Windows 7 Ultimate 32 bit
Orlando, Florida
 
 

Yes, it should. That is a mistype on my part. I will correct it. Thank you very much.
My System SpecsSystem Spec
05 Apr 2010   #9
CarlTR6

Windows 7 Ultimate 32 bit
Orlando, Florida
 
 

Thank you Derek. Much appreciated.
My System SpecsSystem Spec
Comment

 Disk Cleanup : Extended problems?



Tutorial Tools



Similar help and support threads for: Disk Cleanup : Extended
Windows 7 Tutorial Category
disk cleanup? Performance & Maintenance
Disk Cleanup Question Please? Performance & Maintenance
Disk Cleanup Performance & Maintenance
Extended Disk Cleanup : New Tutorial! Chillout Room
Automating Disk Cleanup? General Discussion


All times are GMT -5. The time now is 10:06 PM.


Seven Forums Android App Seven Forums IOS App Follow us on Facebook

Windows 7 Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows 7" and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32