Hiển thị các bài đăng có nhãn cleanup. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn cleanup. Hiển thị tất cả bài đăng

Chủ Nhật, 27 tháng 9, 2009

Disk Cleaning Scheduler



Hi, today I will be sharing a Disk Cleaner Scheduling Script I created.
I took parts of the Temp File Remover Script and combine it with Windows Disk Clean Up.
I also scheduled them to run once a week minimized.
Download it here for Vista
Download it here for Windows 7 (I decided to leave the Prefetch folder alone in Windows 7 since it handles itself well enough.
To install simply Download, Extract and Right Click, run Install.bat with Administrator Permission.
It will create a new Folder called "Clean Disk" in C:\windows (Due to the stupid spacing parsing problem with Program Files) then schedule the tasks.
You can delete the downloaded folders and zip files after that.
To uninstall, Download,Extract and simply Right Click run the Uninstall.bat with Administrator Permission.
I think this will be my final version.
Give your comments.
Thank You.

Edit:
I have updated the script to run as a System Task so the annoying popup that tell you it is cleaning up tempfiles no longer appears.

Thứ Ba, 30 tháng 6, 2009

How To Clear Up your Disk on Windows Xp and Vista

To Clean up your Disk it is actually very simple
There are only a few place where the junk gather
  1. Take a Look at C:\
  • You should only see the following 3 folders
  1. Documents and Settings
  2. Program Files
  3. WINDOWS
The rest is either
Driver files loaded by OEM
Lazy users who refuse to save it to their home directory respectively
Programs which do not install by default to Program Files Directory (and the installer did not bother to redirect the program there he/she just keep clicking NEXT NEXT NEXT FINISH)

They are all deletable except for the Programs which is better to reinstall via Control Panel into the correct Program Files directory to keep it neat

For Windows Xp you can clear up on the following folders
You may encounter file in use because the operating system is currently using the caches so it is locked
If you encounter this you can just skip that particular file
  • C:\WINDOWS\Temp
I need to elaborate on Prefetch
Prefetch is a place where the system cache certain programs so it can run faster
The official stand is that it is a self managing folder where rarely used program will get cleaned up automatically however you can still clear it up once it a while
After you clear up the system will need to prefetch again however there is no harm or any sort done
Also you will notice the system boots faster immediately after you clear Prefetch because Prefetch is loaded on boot so when it is cleared up it boots faster
  • C:\WINDOWS\Prefetch
Next Open (Delete everything inside)
  • C:\Documents and Settings\User\Local Settings\Temp
At the end of it there is already a tool to clean up your disk
It is called Disk Cleanup
It clears all the above mention folders except Prefetch.

The following is a disk cleanup script from mydigitallife for Windows Vista
@echo off
cls
TITLE Windows Vista System Junk Cleaner v1.0
echo.
echo Windows Vista System Junk Cleaner
echo Version 1.1
echo.
echo (C) 2007 My Digital Life (www.mydigitallife.info)
echo.
echo This batch script is provided as is without warranty.
pause
echo.
echo.
echo Start cleaning and deleting Vista system junk?
echo (Press Ctrl-C and answer Y to terminate)
pause
cls

del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old
del /f /s /q "%appdata%\Microsoft\Windows\cookies\*.*"
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temp\*.*"
del /f /s /q "%appdata%\Microsoft\Windows\Recent\*.*"
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
del /f /s /q %windir%\SoftwareDistribution\Download\*.*
rd /s /q "%userprofile%\Local Settings\Temp\" & md "%userprofile%\Local Settings\Temp\"
rd /s /q %windir%\Temp & md %windir%\Temp

cls
echo.
echo Windows Vista System Junk Cleaner
echo Version 1.1
echo.
echo (C) 2007 My Digital Life (www.mydigitallife.info)
echo.
echo This batch script is provided as is without warranty.
echo.
echo.
echo Vista system junk cleaning and deleting completed.
echo.
echo Press any key to exit.
pause
Just copy the script onto notepad, save as diskcleanup.bat.
Run with admin permission.
As you can see the script is completely clean.