Clean old log files

Date: 2016-07-25

Original source: http://stackoverflow.com/questions/51054/batch-file-to-delete-files-older-than-n-days

(Cleans log files in the same directory as the bat file, named *.log* at least 14 days old)

@echo off
pushd "%~dp0"
set CMD1=forfiles -p "%CD%" -s -m *.log* /D -14 /C "cmd /c del @path"
REM echo %CMD1%
start "" %CMD1%
popd
echo %CD%
pause
4000cookie-checkClean old log files