Scheduled disk cleanup

G

Guest

I came across a little utility that runs disk cleanup on a scheduled basis.
I would like to run it on two different schedules - weekly to clean the
temporary stuff and monthly to compress old files. The utility involves
using "cleanmgr /sageset:100" to set up my action preferences and
"...\cleanmgr.exe/sagerun:100" to actually schedule and run the cleanup. Can
I change the 100 to 200 to set up and run a different set of preferences and
schedule? Is there something else I should know about this process?
 
W

Wesley Vogel

Description of the Disk Cleanup Tool in Windows XP
http://support.microsoft.com/kb/310312

This explains the available options for Disk Cleanup...
And also explains sageset and sagerun.
How to Automate the Disk Cleanup Tool in Windows XP
http://support.microsoft.com/kb/315246
Can I change the 100 to 200 to set up and run a different set of
preferences and schedule?

Yes.

You can also set up different batch files with different sageset and sagerun
settings and schedule the .bat files to run. Or double click the .bat files
to run them at any time.

For example you could have one like...

cleanmgr /sageset:99
cleanmgr /sagerun:99

You could save it as cleanmgr99.bat

And another like..

cleanmgr /sageset:100
cleanmgr /sagerun:100

You could save it as cleanmgr100.bat

Both of those would popup with the option displayed so that they could be
set each time.

There all kinds of things that you can do with cleanmgr and sageset and
sagerun.

See these....
2) CleanAll Updated
3) Basic Cleanup: All Versions Of Windows
4) Advanced Cleanup Batch File For Win9X
5) Advanced Cleanup: Other Versions Of Windows
6) Sageset Unlocks CleanMgr's Power
7) SageRun Completes the Picture
8) Cleaning the Temporary File Areas
9) Extending The Commands
10) Now Add SageRun
11) Batch It Up
12) Download A CleanXP Template
here...
http://www.langa.com/newsletters/2002/2002-04-04.htm
for some more info.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
G

Guest

Thanks a lot, Wes! The references are very useful and timely. Do you have
any similar references for automating the Defrag function?
 
G

Guest

Thanks, Ayush . . . I also found a helpful article at kb555098 - How to
Automate Disk Defragmenter Using Task Scheduler in Windows XP. Pretty soon
all of my computer time will be production - not maintenance and housekeeping!

Ayush" <"ayushmaan.j[aatt]gmail.com said:
Replied to [OldMel]s message :
Do you have
any similar references for automating the Defrag function?

There is a command line tool Defrag.exe :
Start - RUn - CMD - Type :
defrag /?




Or:

http://support.microsoft.com/kb/283080


Good Luck, Ayush.
 
W

Wesley Vogel

How to Automate Disk Defragmenter Using Task Scheduler Tool in Windows XP
http://support.microsoft.com/kb/555098

There are two defrag tools in XP.

dfrg.msc is the pretty one that opens from
Start\All Programs\Accessories\System Tools.

defrag.exe is the command line tool that runs from the command prompt.

defrag.exe is the one that you can schedule.

Description of the New Command Line Defrag.exe Included with Windows XP
http://support.microsoft.com/kb/283080

How To Schedule Tasks in Windows XP
http://support.microsoft.com/kb/308569

How to Defragment Your Disk Drive Volumes in Windows XP
http://support.microsoft.com/kb/314848

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
OldMel said:
Thanks, Ayush . . . I also found a helpful article at kb555098 - How to
Automate Disk Defragmenter Using Task Scheduler in Windows XP. Pretty
soon all of my computer time will be production - not maintenance and
housekeeping!

Ayush" <"ayushmaan.j[aatt]gmail.com said:
Replied to [OldMel]s message :
Do you have
any similar references for automating the Defrag function?

There is a command line tool Defrag.exe :
Start - RUn - CMD - Type :
defrag /?




Or:

http://support.microsoft.com/kb/283080


Good Luck, Ayush.
http://www.microsoft.com/windowsxp/using/setup/tips/advanced/mdbutton.mspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top