Forum Discussion
ashokkumareds
10 years agoContributor
Hi,
You can use the below code.
function GeneralEvents_OnStopTest(Sender)
{
try{
aqFileSystem.DeleteFolder(Log.Path, true);
}catch(ex){
Log.Warning("Error in deleting the logs...!" + ex.description);
}
}
However this will leave a <unspecifiec log> entry in the "TestLogs". This is a dangling pointer. This can be removed or this will disppear on closing and reopening the testcomplete.
TanyaYatskovska
Alumni
10 years agoHi Pradeepdli,
You can consider keeping only a certain number of Test Log, say 10 last reports. For this, you need to activate the Tools | Options | Engines | Log | Number of recent logs to keep option.
In this case, there won't need to delete log files.