Windows file cleanup/housekeeping

Since I routinely run WAMP servers (see previous article) and develop primarily on Windows machines, I find that a lot of garbage remains on these machines. Often these files are created temporarily and not deleted and/or are created for some perceiver performance gains. Additionally, its often nice to schedule cleanup operations for times when you are not using the machine…. here’s a few common items to consider.

@echo off echo ======= DELETES =========
del /q %windir%*.log
del /q %windir%*.tmp
del /q %windir%securitylogs*.*
del /q %windir%SoftwareDistributionDataStoreLogs*.*
del /q %windir%msdownld.tmp*.*
del /q %windir%$hf_mig$*.*
del /q %TEMP%msdownld.tmp*.*
del /q %TEMP%*.dat
del /q %TEMP%*.log
del /q %TEMP%*.tmp
del /q %TEMP%*.xpi
del /q %TEMP%sess_*.*
del /q %TEMP%logs*.*
del /q c:*.log
del /q c:logs*.*
del /q /s %USERPROFILE%*.dmp
del /q /s %USERPROFILE%SIDisttemp*.*"
echo ======= Prefetch ==========
del /q %windir%Prefetch*.*
echo ======== DEFRAG ===========
%windir%system32defrag.exe c: -f -v >%TEMP%batch_defrag.txt
echo ========= done ============


echo ======== ANALOG ===========
cd c:analog6.0 analog +glocalhost.cfg
echo ========== IP =============
%windir%system32ipconfig.exe /all > %TEMP%batch_ip.txt
echo ======== NETSTAT ==========
%windir%system32netstat.exe -a > %TEMP%batch_netstat.txt

NOTE: this entry will be updated occasionally!

WAMP Servers

I often find myself administering WAMP (Windows, Apache, PHP/Perl/Python, mySQL) servers…. usually this occurs because it is better ‘supported’ (or perhaps ‘tolerated’) configuration in a corporate alternative to the more common LAMP (Linux… etc.) variety. This gives you the benefit of a centrally controlled operating system while maintaining a mostly open source server environment. Albeit with Microsoft’s poor security record, you’ll be patching it a LOT!

Many common distributions exist… here’s some helpful resources with downloads:

If you are a Java shop, you might also consider the following…

Configuration of each of these is a topic in it’s own right. If you need a shortcut to development, you may want to check out this!

Good luck!!!