Created
April 29, 2012 17:13
-
-
Save AndrewBarfield/2552013 to your computer and use it in GitHub Desktop.
DOS Batch File: Windows 7 Cleanup Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo off | |
REM Replace [[[USER]]] with your local user account name | |
REM Clean Libraries | |
del /Q /S "C:\Users\[[[USER]]]\Contacts\*.*" > nul | |
del /Q /S "C:\Users\[[[USER]]]\Downloads\*.*" > nul | |
del /Q /S "C:\Users\[[[USER]]]\Music\*.*" > nul | |
del /Q /S "C:\Users\[[[USER]]]\Pictures\*.*" > nul | |
del /Q /S "C:\Users\[[[USER]]]\Videos\*.*" > nul | |
del /Q /S "C:\Users\Public\*.*" > nul | |
REM Clean Temp Folders | |
rmdir /Q /S "C:\Users\[[[USER]]]\AppData\Local\Temp" > nul | |
mkdir "C:\Users\[[[USER]]]\AppData\Local\Temp" > nul | |
rmdir /Q /S "C:\Users\[[[USER]]]\AppData\LocalLow\Temp" > nul | |
mkdir "C:\Users\[[[USER]]]\AppData\LocalLow\Temp" > nul | |
rmdir /Q /S "C:\Users\All Users\Temp" > nul | |
mkdir "C:\Users\All Users\Temp" > nul | |
rmdir /Q /S "C:\Program Files (x86)\Temp" > nul | |
mkdir "C:\Program Files (x86)\Temp" > nul | |
REM Clean Special System Folders | |
rmdir /Q /S "C:\$RECYCLE.BIN" > nul | |
REM Disable Hibernate | |
powercfg.exe /hibernate off > nul |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use %username% instead of [[[USER]]].