First of all, I'd like to say SORRY if this isn't the right place to post this. Maybe the Q&A Forum? I really didn't want to make this an Article so yeah...here goes..
This little HOW TO is for all of you that like to do a disk cleanup (start menu | programs | accessories | system tools | disk cleanup ) every so often. What this will teach you is how to do it automatically with windows 98 and higher using a batch file and the task scheduler.
First, we need to go to a command prompt:
For 98/ME : start menu | run | type "command" (no quotes) | hit "OK"
For NT/2K/XP: start menu | run | type "cmd" (no quotes) | hit "OK"
Once at the command prompt type ...
Code:
cleanmgr /sageset:5
(notice the spacing!)
Once that is finished the Disk Cleanup Wizard will open up and you select all the things you want to delete once you run the batch file. It can be anything you want. After choosing what you want to delete when it's run hit the "OK" button. Once you hit the OK button you'll be brought back to the Command prompt. Now, at the command prompt type "exit" (no quotes) to leave it.
Now, open a new notepad document and copy/paste the following code into it.
Code:
@echo off
cls
CLEANMGR /sagerun:5
GOTO EOF
:EOF
exit
Now, after copying and pasting that code into notepad click the "file" then "save as" button and name your file "cleanmgr.bat" (WITH quotes). Save it somewhere you can find it again.
Now, if you want to have this run at a scheduled time like at 5am every Monday you can use the Task Scheduler. To open the task scheduler, Start Menu | Programs | Accessories | System Tools | Scheduled Tasks (Task Scheduler). Once it opens then click the "Add Scheduled Task" or "Add Task" icon. After clicking it there will be a new window that opens asking which program you want to run. You should see a "browse" button, click it and browse to where you saved the "cleanmgr.bat" file and select it. Now click "next" and then you can choose when it should run. Now click next, if you want you can setup advanced timing options after clicking next when it asks when you want it to be run.
If you DON'T want it to run as a scheduled task and just want it available at the touch of a button, just double click the "cleanmgr.bat" file we created and it will do it automatically.
**NOTE** you can change the /sageset:5 to ANY number you want to give you multiple deleting options. I.E /sageset:5 deletes Temp Inet files and /sagset:16 deletes cookies...
Partie, this is very nice! I do have one question...forgive me if it's a stupid question, but when I run the command "cleanmgr /sageset:5" the Disk Cleanup Wizard that opens is a little different than the one in the System Tools folder. Is it supposed to be that way? The one that opens from your batch file actually gives you more items to delete, but it doesn't tell you how much space your saving like the existing one does. Is it just me or is it a different Cleanup wizard? Thanks!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum