Windows 7 Forums Search
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows 7. The Windows 7 forum also covers news and updates and has an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7 - Disk Cleanup : Extended



 

Disk Cleanup : Extended

How to Use Extended Disk Cleanup in Windows 7
Published by Bare Foot Kid
04-05-2010
Default Disk Cleanup : Extended

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!



Published by
Original Team Member

Join Date: Jun 2008
Location: The Lowcountry
Posts: 23,809
Bare Foot Kid has disabled reputation

Tutorial Tools
04-05-2010   #1
CarlTR6


Windows 7 Ultimate 32 bit
 
 


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

My System SpecsSystem Spec
04-05-2010   #2
Bare Foot Kid


W 7 64-bit Ultimate
 
 


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


Windows 7 Ultimate 32 bit
 
 


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; 04-05-2010 at 08:37 PM.. Reason: Corrected a typing error.
My System SpecsSystem Spec
.


04-05-2010   #4
Bare Foot Kid


W 7 64-bit Ultimate
 
 


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


Windows 7 Ultimate 32 bit
 
 


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


Windows 7 Ultimate X64 SP1
 
 


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
04-05-2010   #7
derekimo


Windows 7 Pro 64 SP1
 
 


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; 04-05-2010 at 08:48 PM.. Reason: updated
My System SpecsSystem Spec
04-05-2010   #8
CarlTR6


Windows 7 Ultimate 32 bit
 
 


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


Windows 7 Ultimate 32 bit
 
 


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

Disk Cleanup : Extended problems?



Tutorial Tools



Similar Threads for: Disk Cleanup : Extended
Windows 7 Tutorial Category
Disk Cleanup - Open and Use Tutorials
Disk Cleanup Performance & Maintenance
Extended Disk Cleanup : New Tutorial! Chillout Room
Uhh, Disk Cleanup Question... Performance & Maintenance
Automating Disk Cleanup? General Discussion


All times are GMT -5. The time now is 08:17 PM.



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