-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcleaner.bat
More file actions
31 lines (23 loc) · 818 Bytes
/
cleaner.bat
File metadata and controls
31 lines (23 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@ECHO OFF
title Windows Junk File Cleanup
color 0a
echo Running windows built in Disk Cleanup tool . . .
echo.
REM Running windows built in Disk Cleanup tool.
cleanmgr.exe /sagerun:1
pause
echo.
echo Removing more junk folders and files . . .
echo.
REM Removing more junk folders and files that the Disk Cleanup tool does not clean.
rd "%temp%" /s /q
rd "%WINDIR%\Temp" /s /q
rd "%WINDIR%\Prefetch" /s /q
rd "%userprofile%\AppData\Local\Microsoft\Windows\INetCache\IE" /s /q
del "%WINDIR%\Downloaded Program Files\*" /s /f /q
for /f "skip=1" %%d in ('wmic logicaldisk get DeviceID ^| findstr /v /r "^$"') do for /f "delims=" %%u in ('dir /a /b %%d\$Recycle.bin 2^>nul') do rd "%%d\$Recycle.bin\%%u" /s /q
REM Finished.
echo.
echo All junk folders and files removed!
echo.
pause