Pruning Flex Storage Data from PingPlotter 5 - Windows Instructions
THE FOLLOWING ONLY APPLIES TO INSTALLATIONS USING FLEX STORAGE (.PPSAMPLE FILES) AND VERSIONS 5.8.1 AND NEWER
My PingPlotter 5 data is getting pretty large. Is there a way on Windows to prune data from PingPlotter 5 Flex Storage?
Yes! In fact, it’s pretty easy. We’ll go over a couple of ways to do that below, starting with manual deletion, then deletion using a script, then putting the script on a Task Schedule. If you're hoping to speed through this and you want a tl;dr, we have a script in the Attachments section at the bottom of this article that you can run to delete 30 days of data from Flex Storage.
If you’re in a hurry, you might just want to manually delete some files yourself. Doing so with Flex Storage is simple!
All you’ll need to do is to close the app and stop the service, if applicable, and navigate to one of the following folders depending on your installation:
- %Programdata%\PingPlotter 5\SampleSets (If installed as a service)
- %Localappdata%\PingPlotter 5\SampleSets (if installed as an application)
In this folder, you’ll see a bunch of folders (we heard you like folders...).
These folders are organized by the date range specified in Edit → Options → Auto-Save Data (we’ve elected to save by month).
If you’d like, you can go ahead and remove entire folders, starting with the oldest first. Alternatively, for more precision, you can head into the folders and remove certain sample set files.
You have the option of sorting these files by modified date and deleting the oldest ones, or you can read through all the files to figure out which ones you don’t want. Here’s a breakdown of what the files look like and how to read them:
pingplotter_com 2019-04 5xk77hznemdrbpg6955wu8ta1h.pp_sample
- Pingplotter_com - This is the target, with underscores substituted for periods.
- 2019-04 - This is the date that the file started (YYYY-MM). If you’ve saved by day, you’ll probably see it look like “2019-04-17” (YYYY-MM-DD).
- 5xk77hznemdrbpg6955wu8ta1h - This is the GUID. This ties the session to the data. Make sure that you don't change this value. Otherwise, the data will no longer be tied to the session.
Pruning the data automatically
If you’ve got bigger fish to fry than going through your files and deleting them manually, you can absolutely have a script do it for you. We’ve done it here using a batch file - you can use our batch file, or you can make something to your own liking!
First, you’ll need to make the script or download the one we have attached at the bottom of this page. Here’s what we’ve put in the batch file:
net stop pingplotter5
ForFiles /p "C:\ProgramData\PingPlotter 5\SampleSets" /s /d -30 /c "cmd /c del @file"
net start pingplotter5
We’ve made this script so that it’ll prune the service folder, and we’ve made it delete files older than 30 days. You can edit these values if you so please, and we also have a batch file for the application folder located at the bottom of this page if you’re running just the app.
Once you’ve got your handy dandy batch file, you’re ready to run it! Make sure you run the file as administrator - and check out the before/after of your process!
Running the Batch on a Schedule
By using the provided cleanup tool and batch file, you can easily set up an automated task with Windows Task Scheduler. First, get into Task Scheduler. You'll want to choose the option Create Task; using Create Basic Task will not contain a function that allows automation to complete successfully.
Here, you can name the task and give it a description. We've chosen to run whether the user is logged on or not; you can make your selection based on appropriate organizational protocol. It is imperative that "Run with highest privileges" is selected; the automation will not function unless this is selected.
The task can be set to run as frequently as you'd like. We'd recommend setting a trigger to recur on a weekly or monthly basis.
Set the action to start a program, and browse for the batch file you've downloaded and edited. Using the batch file will stop the PingPlotter Windows service (if applicable), prune the files necessary, and start the Windows Service once again; this will all be unattended and will close upon completion.
For simplicity's sake, we have left these values at defaults. You're welcome to alter these values to fit your needs.
Once you've performed all these steps, the automation should run successfully on the schedule you've dictated. Feel free to alter settings and experiment as needed; you will always know what's best for your data and your organization. Should you find yourself in need of support, please don't hesitate to reach out to firstname.lastname@example.org and we'll gladly help however we can.