• We just launched and are currently in beta. Join us as we build and grow the community.

boujee's Logs Cleaner script (.exe, .bat, .scr, .lnk, ...)

_thomasforsman_

Information Vulnerability Scanner
T Rep
0
0
0
Rep
0
T Vouches
0
0
0
Vouches
0
Posts
78
Likes
116
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 400 XP
This script deletes all files with the following extensions from the current folder and all subfolders:
.exe, .bat, .scr, .lnk, .bin, .cmd, .js, .jse, .gadget, .jar, .msi, .wsf, .vbs, .ps1, .app, .vb, .hta
You can add or remove extensions from the list without breaking the script.
Save this source as .bat and run it inside your log folder:
Code:
@ off
setlocal enabledelayedexpansion
set extensions=.exe .bat .scr .lnk .bin .cmd .js .jse .gadget .jar .msi .wsf .vbs .ps1 .app .vb .hta
cls
echo.
for %%i in (%extensions%) do (
set count=0
for /r %%j in ("*%%i") do (
if "%%~nj" neq "%~n0" (
del /f /q "%%j"
set /a count+=1
echo   Deleted file: "%%j"
)
)
echo   The above !count! files with extension "%%i" were deleted.
echo.
)
echo   Done. Press any key to exit.
echo   - boujee
pause >nul
 

452,496

332,845

332,853

Top