Clear Old 3CX Call Reports Automatically

Status
Not open for further replies.

DrainBamaged

Forum User
Advanced Certified
Joined
Feb 21, 2019
Messages
168
Reaction score
41
FYI, I set up a Powershell script in Task Scheduler on our server to delete old 3CX Call Reports automatically. We set ours to delete anything older than 180 days, but you can adjust as you see fit. Should be obvious where you change that. :)

I run this nightly to keep the files in check, as I do not want it slowly filling up my C: drive. This will only delete files and not folders.

Would be nice to have this built into 3CX. Would also be nice to put these reports elsewhere other than C:.

Get-ChildItem –Path "C:\ProgramData\3CX\Instance1\Data\Http\Reports" -file -recurse | Where-Object {($_.LastWriteTime -lt (Get-Date).AddDays(-180))} | Remove-Item -Recurse
 
  • Like
Reactions: YiannisH_3CX
Hello @DrainBamaged

Thank you for sharing your script with the community and for your feedback.
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,920
Messages
589,741
Members
164,794
Latest member
avmullins