I surfed around the net and really wasn't able to find any batch files to delete IIS log files. The closest I was able to come was to delete all files in the log folder based on the file age. This batch file will delete all files in the named folder that are over 1 day old:
@echo off
forfiles -p C:\"PATH TO LOG FOLDER" -s -m *.* -d -1 -c "CMD /C Del @FILE"
This does not delete the current log file, which is not possible because IIS wont let you.
I hope this helps somebody not waste their night surfing the net
@echo off
forfiles -p C:\"PATH TO LOG FOLDER" -s -m *.* -d -1 -c "CMD /C Del @FILE"
This does not delete the current log file, which is not possible because IIS wont let you.
I hope this helps somebody not waste their night surfing the net