Link to home
Start Free TrialLog in
Avatar of Erik Whiteway
Erik WhitewayFlag for Canada

asked on

Batch file to really clean the c drive

I'm looking for a simple dos batch file to do the following (it can call VBS if needed):

1. delete the content of c:\temp
2. delete the content of c:\windows\temp
3. delete all the $ntuninstall...$ type files in c:\windows
4. (optional) go in to users profiles and delete temp files etc..
5. (optional) delete profiles that are over 1 yr old
6. run defrag

I can find / write scripts for 1,2,4,6 - but nothing that will deal with the $uninstall$ files.

I don't want to use MS diskclean up  - as it misses most of the files that are the issue.
I deally I don't want to use any external programs, just what is default in windows.

I know tons of people must have something like this - but I can't find any online.
ASKER CERTIFIED SOLUTION
Avatar of Member_2_921743
Member_2_921743
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of johnb6767
"3. delete all the $ntuninstall...$ type files in c:\windows"

I wouldnt do this if I were you, unless you never want to remove a KB update in the future.....