The system constantly collects files like the browser cache and cookies when surfing. With time, Windows really can't manage the heavy load. To help Windows slim down again, it needs an occasional hard disk cleanup. You can find the built-in tool under 'Start I All Programs I Accessories I System tools'. Of course Windows reports when you need to clean the disk, but it mostly does that at inconvenient times. To make the system take care of this regularly in the background, create a batch file. Just like for the earlier script, open a text editor and save the resulting file with the extension BAT:
"C" stands for the system partition; replace the drive letter if it doesn't apply on your computer. To automate this task, we'll use the power scheduler tool Z-Cron. Depending on how much the computer is used, you should run the hard drive cleanup every two weeks or so. Open Z-Cron and under 'Programs', create a new entry. Now in the 'Name' field, enter a name for the new job and select the script you just created under 'batch file'. Under 'Time planning', click 'Month I Day' and select each alternate Monday, for example. Then define a start time by clicking on 'Time plan'. If you want to run a cleanup at each system start instead, use the 'Autostart' option.
Using this batch file, Windows will delete all data related to the checked boxes in the Disk Cleanup dialog box. If you want to delete only specific elements, you can control that without too much effort. For example, to empty only the Recycle Bin at regular intervals, create a variation of the previous batch file the 'Start I Run .. .' dialog and ensure that only the Recycle Bin entry is activated in the list that pops up. Then write another batch file so that the system only performs the selected action.
Specify another job in Z-Cron for this new file. With these instructions, you can run different Disk Cleanup tasks at different times and frequencies depending on your needs.
Note: The 'sage set' and 'sagerun' operators allow you to define custom combinations of Disk Cleanup tasks, such as emptying the Recycle Bin, deleting Temp files, clearing the browser cache and cookies, compressing older files, etc. Running cleanmgr.exe with the 'sageset:XX' operator lets you define which actions are active in that set, but without running them at the time. Simply repeat (or schedule) the command with the 'stagerun' operator and the appropriate numerical value to trigger the set of actions associated with that number. The number can be anything between 0 and 65535, and the set of actions you define will be stored in the Win.dows registry. When you run a sageset, there won't be any user prompts, so the actions can be configured to run when the PC is unattended. Note that the actions will be run on all drives and 'Partitions, although only the 'Recycle Bin',' Catalog files for content index' and 'Compress old files' options apply to drives other than your Windows system drive.




Reply With Quote
Copyright Techfuels
Bookmarks