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
This web page is mostly a walk-via for the entire information you wished about this and didn抰 know who to ask. Glimpse here, and you抣l undoubtedly discover it.
Unquestionably imagine that which you stated. Your favourite justification seemed to be at the internet the easiest thing to consider of. I say to you, I definitely get annoyed whilst other people think about concerns that they plainly don’t recognize about. You controlled to hit the nail upon the top as smartly as outlined out the whole thing with no need side effect , other folks could take a signal. Will probably be again to get more. Thanks
Your articles are extremely helpful to me. May I ask for more information? http://www.kayswell.com
Thank you for writing this post! http://www.kayswell.com
Good web site! I truly love how it is easy on my eyes and the data are well written. http://www.kayswell.com I am wondering how I could be notified whenever a new post has been made. I’ve subscribed to your RSS which must do the trick! Have a nice day!
Thank you for providing me with these article examples. May I ask you a question? http://www.hairstylesvip.com
what’s the question?