EggXpert

The official Newegg tech support community and Newegg tech support forums. Learn about PC building, case mods, computer repairs, and computer troubleshooting. Get help from knowledgable community members about computer hardware and computer software, laptops, notebooks, netbooks, consumer electronics & mp3 players, home networking, lcd TVs, home audio and more.
Welcome to eggXpert.com. Sign in | Join | Help
in Search
Advanced Search

A simple code for you to clean crap files

Last post by . replies.
Sort Posts: Previous Next
  •  07-17-2007, 2:58 AM 108861

    A simple code for you to clean crap files

    Here is the simple code I made. Copy it to a notepad and Save As ****.bat. Simply double click the bat file to run cleaning process.

    _____________________________________ 

    @echo off 
    echo Ready to clean system crap file, please wait...
    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 %systemdrive%\recycled\*.* 
    del /f /s /q %windir%\*.bak 
    del /f /s /q %windir%\prefetch\*.* 
    rd /s /q %windir%\temp & md %windir%\temp 
    del /f /q %userprofile%\recent\*.* 
    del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*" 
    del /f /s /q "%userprofile%\Local Settings\Temp\*.*" 
    del /f /s /q "%userprofile%\recent\*.*" 
    echoCleaning  Completed! 
    echo. & pause 

    ____________________________________________

    It takes 30 sec to run on my computer. It will clean cache files on your system disk efficiently. You will find you get extra disk space recovered after running it. Enjoy it. PS: I only test the code under Wind XP SP2.  




  •  07-17-2007, 7:34 AM 108966 in reply to 108861

    Re: A simple code for you to clean crap files

    thanks

    Buddies 


    SPECS:
    Windows 7 64 Home Premium / Vista Business 64
    AMD 6000+
    4 gigs G.Skill
    Nvidia 8800GTS 640 MSI OC

    1-31-07 Never Forget
  •  07-17-2007, 8:19 PM 109858 in reply to 108861

    Re: A simple code for you to clean crap files

    wow...it starts to clean immediately...but what 'craps' it cleans ?

  •  07-18-2007, 7:00 AM 110278 in reply to 109858

    Re: A simple code for you to clean crap files

    As you can see from the code, it cleans up a bunch of temporary and log files that is created when installing programs, patches, and just plain using the Internet.

    w i l z d e z i g n ... XHTML, XML, CSS, ColdFusion, PHP, SQL, jQuery
  •  07-18-2007, 6:35 PM 111147 in reply to 110278

    Re: A simple code for you to clean crap files

    Ill have to try this when I get home. Thanks for writing the code out.
  •  07-20-2007, 7:14 PM 113321 in reply to 108861

    Re: A simple code for you to clean crap files

    Your code was a little off here is the edited version...

     

     

    @echo off 
    echo Ready to clean system crap file, please wait...
    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 %systemdrive%\recycled\*.* 
    del /f /s /q %windir%\*.bak 
    del /f /s /q %windir%\prefetch\*.* 
    rd /s /q %windir%\temp & md %windir%\temp 
    del /f /q %userprofile%\recent\*.* 
    del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*" 
    del /f /s /q "%userprofile%\Local Settings\Temp\*.*" 
    del /f /s /q "%userprofile%\recent\*.*" 
    echo Cleaning  Completed! 
    echo & pause

  •  07-20-2007, 7:54 PM 113369 in reply to 113321

    Re: A simple code for you to clean crap files

    Anyone successfully use this under Vista?

     - Using Vista Ultimate 32-bit

     



  •  07-21-2007, 10:47 AM 113812 in reply to 113369

    Re: A simple code for you to clean crap files

    Wow cool thanks. It's still running right now and it's taking quite a while.
  •  07-21-2007, 2:38 PM 114015 in reply to 108861

    Re: A simple code for you to clean crap files

    Why use a script when there are great freeware tools like CCleaner that do the same thing, probably better (and safer.)

    http://www.ccleaner.com/

     or http://www.download.com/CCleaner/3000-2144_4-10669303.html?tag=lst-0-1

    I use it a lot, and it grabs temp files and MRU (most recently used) lists from various programs too. It also has a nice registry cleaner built in. Give it a try.

  •  07-22-2007, 6:02 PM 114841 in reply to 114015

    Re: A simple code for you to clean crap files

    Great tip!
  •  10-31-2007, 2:06 PM 191544 in reply to 114015

    Re: A simple code for you to clean c**p files

    KVcleaner:

    Why use a script when there are great freeware tools like CCleaner that do the same thing, probably better (and safer.)

    http://www.ccleaner.com/

     or http://www.download.com/CCleaner/3000-2144_4-10669303.html?tag=lst-0-1

    I use it a lot, and it grabs temp files and MRU (most recently used) lists from various programs too. It also has a nice registry cleaner built in. Give it a try.

     

    Why install a lousy program like CC cleaner, which caused me more problems than it fixed, vs a nice script that takes up all of 1kb. 

     Nice code, thx.
     

  •  10-31-2007, 2:41 PM 191582 in reply to 108861

    Re: A simple code for you to clean c**p files

    this is great, thank you for sharing

    i would be careful with removing *.log files, ive come across a lot of software that relies on the log file for uninstalling, once it sees the log is missing, it aborts the uninstall process

  •  11-01-2007, 6:01 PM 192777 in reply to 108861

    Re: A simple code for you to clean c**p files

    Tks......Did a fine job for me.....tks for the code..Woohoo
  •  11-02-2007, 9:56 AM 193333 in reply to 192777

    Re: A simple code for you to clean c**p files

    what about the umm...disk cleanup wizard in accesories\system tools?

     


    Xion Xon 102
    Razer Deathadder
    Logitechs510
    EVGA 680i SLi SE
    Intel Core2Duo E6750
    Thermalright Ultra 120 Extreme
    Sapphire x1600pro
    2x1GB Kingston HyperX 1066
    160GB WD Caviar - Vista Ultimate x86
    80GB Hitachi Desk Star - Ubuntu 7.10 64 bit
  •  11-02-2007, 1:56 PM 193544 in reply to 191582

    Re: A simple code for you to clean c**p files

    I would also watch out for *.bak files. Sometimes various programs will use this extension. Also from time to time, I have changed file names to*.bak but still wanted to keep the *.bak version.
  •  11-02-2007, 2:23 PM 193557 in reply to 193544

    Re: A simple code for you to clean c**p files

    ianwelch:
    I would also watch out for *.bak files. Sometimes various programs will use this extension. Also from time to time, I have changed file names to*.bak but still wanted to keep the *.bak version.

     CensoredSo how many cracked exe files have you used? Sorry, I'm always the wise guy! If you notice it only looks for ".BAK" files in the "windows directory"... I haven't had a need to crack any windows files, have you? This script has proven to be very handy in my experiences. You see all you need is internet access, you can cut and paste this script anywhere anytime, or, "you can remember it" So when you working on a customers workstation, and the virus has blocked win install, you can open notepad "AND TYPE THE CODE!" Lets see any program do that! This does not install anything, or does not need to be uninstalled. And it can shave hours off of your scan times...

  •  11-02-2007, 8:41 PM 193765 in reply to 108861

    Re: A simple code for you to clean c**p files

    Ynot:

    del /f /s /q "%userprofile%\Local Settings\Temp\*.*" 

    I would leave above path alone.  Some uninstall programs look for temp iS*.* files in there, and if it doesn't find it, will refuse to uninstall or will put out some errors.  Symantec antivirus and Quicken 2006 are ones that victimized me.  Not a problem though if you use the Administrator user to install programs and not use the code while logged in as Administrator.

     

  •  11-03-2007, 9:10 AM 193877 in reply to 191544

    Re: A simple code for you to clean c**p files

    Sandor:
    KVcleaner:

    Why use a script when there are great freeware tools like CCleaner that do the same thing, probably better (and safer.)

    http://www.ccleaner.com/

     or http://www.download.com/CCleaner/3000-2144_4-10669303.html?tag=lst-0-1

    I use it a lot, and it grabs temp files and MRU (most recently used) lists from various programs too. It also has a nice registry cleaner built in. Give it a try.

     

    Why install a lousy program like CC cleaner, which caused me more problems than it fixed, vs a nice script that takes up all of 1kb. 

     Nice code, thx.
     

    CCleaner is a real good program. If you think it no good it's cause you don't know how to use it. What problems did you cause?

     

    Sam 


    nevermind
View as RSS news feed in XML

 Home   Forums   Chat   Blogs   Deals   Newsletter   About 

 FAQ   Terms of Use   Privacy Policy   Contact Us 

©2010 Newegg, Inc. All rights reserved.