IT Systems Engineering Command to delete old log files December 20, 2012 / I found a good command to delete old logs files which were filling up my server forfiles /P “path to your files /M filename.* /D -1 /C “cmd /c del @path” This will delete filename.* files older than one day.