Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide 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 Vista, Windows 7, and Windows 8
Published by Bare Foot Kid
05 Apr 2010
Published by

How to Use Extended Disk Cleanup in Vista, Windows 7, and Windows 8

This will show you how to access and run the Extended Disk Cleanup function in Windows, 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.
Name:  cmd runas.jpg
Views: 19394
Size:  61.6 KB
Name:  cmd UAC.jpg
Views: 19324
Size:  81.3 KB
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

-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.
Name:  disk cleanup.jpg
Views: 19697
Size:  119.8 KB
Name:  Checking.jpg
Views: 19244
Size:  48.5 KB
Name:  cleaning.jpg
Views: 19318
Size:  43.8 KB
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.
Name:  Notepad Runas.jpg
Views: 19211
Size:  65.7 KB
Name:  UAC Notepad.jpg
Views: 19175
Size:  79.4 KB
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
-carls.jpg
-carls1.jpg
Name:  Carl's2.jpg
Views: 19313
Size:  128.4 KB
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.
Name:  Carl's6.jpg
Views: 19128
Size:  56.0 KB
Name:  Carl's7.jpg
Views: 19253
Size:  84.1 KB
Name:  Carl's8.jpg
Views: 19206
Size:  64.6 KB
Name:  Name.jpg
Views: 19108
Size:  42.9 KB
Name:  Clean.jpg
Views: 19139
Size:  28.7 KB
Enjoy!



05 Apr 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
05 Apr 2010   #2
Bare Foot Kid
Microsoft MVP

W 7 64-bit Ultimate
 
 

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
 
 

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.
My System SpecsSystem Spec
.


05 Apr 2010   #4
Bare Foot Kid
Microsoft MVP

W 7 64-bit Ultimate
 
 

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

Windows 7 Ultimate 32 bit
 
 

You are welcome. I hope it helps someone.
My System SpecsSystem Spec
05 Apr 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
05 Apr 2010   #7
derekimo

Microsoft Community Contributor Award Recipient

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.
My System SpecsSystem Spec
05 Apr 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
05 Apr 2010   #9
CarlTR6

Windows 7 Ultimate 32 bit
 
 

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

 Disk Cleanup : Extended




Tutorial Tools





Similar help and support threads
Windows 7 Tutorial Category
Disk Cleanup
I understand what defragment does but Iím not clear about disk cleanup. Can someone please explain? And also, please advise me if this is not the most appropriate discussion for this post.
Performance & Maintenance
Disk cleanup questions
I have a few questions about disk clean up. First I run it and check off all of the options including dump and debug files which are both listed at 662 mb. When it's done deleting the files I run it again only to find that the debug and dump files are both still at 662 mb. Is there anything I can...
Performance & Maintenance
Disk Cleanup
Which files can safely be checked for Disk Cleanup? I don't want to delete something that may casue an issue with the system working correctly.
Performance & Maintenance
disk cleanup?
can i check everything when i run Disk Cleanup?
Performance & Maintenance
Disk Cleanup
Suddenly my Disk Cleanup will not start using Disk Cleanup.exe. I now have to go to Start>Run>cleanmgr to get it to start and that won't pin to the Start Menu which is where I want it. Using Windows 7 Home Premium 64bit.
Performance & Maintenance
Extended Disk Cleanup : New Tutorial!
I hope everyone finds it useful. :) http://www.sevenforums.com/tutorials/76383-disk-cleanup-extended.html#post668379
Chillout Room

Our Sites

Site Links

About Us

Find Us

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

All times are GMT -5. The time now is 11:38.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App