Copy the below mention code in notepad and save as .bat file.
Schedule the file to run on weekly basis.
You can change the location of log file folder and for no. of days you want to keep the logs on the server.
@echo off
forfiles -p "C:\WINDOWS\system32\LogFiles\W3SVC1" -s -m *.* -d -25 -c "cmd /c del @path"
No comments:
Post a Comment