March 8, 2010 at 10:53 am
I have a process that writes a log history to a file maintenance(dateandtime).txt
This is being stored in
D:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log
In the Maintenance Clean Up Task I was wondering if there a way to just use the file extension as Maintenance*.txt so that it removes all txt files for maintenance03082010952.txt after 8 days etc.
Thanks
March 8, 2010 at 7:27 pm
Someone way know of any easier way but in the past in SQL Server 2000 and previous versions I used an AcriveX Script with the File System objects to remove the older files.
I've, the newer versions I have used the For Each Loop COntainer & a Script Task to delete an/or archive files.
Regards,
Kent
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply