How do I purge or remove old access log files to maintain free space on a Reporter server?
The following command can be used on Windows Server 2003 and 2008 operating systems to delete access log files older than a given amount of days:
In the example above, all log files older than 180 days will be deleted. You can alter the command argument after the "/d" option to any desired number of days. Furthermore, substitute "<log dir>" for the actual directory where your logs are located. To automate this process, create a text file containing the above command, then change its file extension to .CMD. At this point the built-in Windows task scheduler can be used to run the command as often as desired.
NOTE: forfiles.exe is a part of the Windows Resource kit. If this file does not exist on your Windows 2003/2008 server, please install the Windows Resource Kit for your version of Windows.
Rate this Page
Please take a moment to complete this form to help us better serve you.