If you parse combat while playing SWTOR using Orbs (Old Republic: Battle Parse) or StarParse, you may have a buildup of old combat logs. StarParse & Orbs give warnings about the number and size of logs in the combat log folder, but it doesn’t delete old entries for you. I wrote a small PowerShell script that is run daily via Task Scheduler that deletes combat logs older than a number of days. I use 7 days myself, but it could even be 1 day because I’ve never gone back and looked at a log that old.
# Define the folder path and the age threshold (in days)
$folderPath = "C:\Path\to\your\CombatLogs"
$daysThreshold = 7
# Get the current date and calculate the threshold date
$currentDate = Get-Date
$thresholdDate = $currentDate.AddDays(-$daysThreshold)
# Get all files in the folder older than the threshold date
$filesToDelete = Get-ChildItem -Path $folderPath -File | Where-Object { $_.LastWriteTime -lt $thresholdDate }
# Delete each file
foreach ($file in $filesToDelete) {
try {
Remove-Item -Path $file.FullName -Force
# (optional) Write-Output "Deleted file: $($file.FullName)"
} catch {
Write-Output "Failed to delete file: $($file.FullName). Error: $_"
}
}
$folderPath: Your combat logs are typically located in your Documents folder, specifically: “C:\Users\[username]\OneDrive\Documents\Star Wars – The Old Republic\CombatLogs”
$daysThreshold: The number of days to keep combat logs before deletion
Running the Script Daily
To run this script daily, you can create a scheduled task in Windows Task Scheduler:
- Open Task Scheduler:
You can find it by searching for “Task Scheduler” in the Windows start menu. - Create a New Task:
- Select “Create Basic Task”.
- Name your task and give it a description.
- Choose “Daily” for the trigger.
- Set the start date and time for when you want the task to run.
- Select “Start a Program” for the action.
- Browse to
powershell.exe
as the program/script. - Add the script file path (e.g.,
C:\Path\To\Your\Script.ps1
) in the “Add arguments” field.
It’s that simple, and you no longer need worry yourself with cleaning up your old useless combat logs.
Yet another thing is that while searching for a good on-line electronics shop, look for online shops that are regularly updated, trying to keep up-to-date with the most current products, the top deals, along with helpful information on services and products. This will make sure that you are doing business with a shop which stays ahead of the competition and gives you what you should need to make knowledgeable, well-informed electronics acquisitions. Thanks for the vital tips I’ve learned from your blog.
You’ve the most impressive websites.
You helped me a lot by posting this article and I love what I’m learning. http://www.hairstylesvip.com