Blue Iris Clips and Files - Disk Usage Utility

Changing two lines as follows:
913 - :
if ($cur_ary_cnt -gt 0 -and $Days -ne 0) {

2722:
if ($timestamp_output_csv_files_flg -and $archive_lifetime_days -ne 0) {

allows the option $archive_lifetime_days to be set to negative numbers. ANY negative number will prune ALL the CSV files. Other values behave the same as before.

I don't need history of usage, this cleans up the CSV files created for the report.
Nice. I'll make the change.
 
Script updated to V7.1. See post #1 to download the file.

Please note the BREAKING CHANGE
see changelog item 1 below

Once again, you will need to edit the user settings file.

Changelog:
  1. BREAKING CHANGE: additional user-setting; change to a user setting
  2. NEW: added user setting $experienced_user_flg to hide output intended for first-time users
  3. CHANGE: user setting $archive_lifetime_days now supports negative integer (prunes all archive files)
 
Script updated to V8. See post #1 to download the file.

Here are some reasons why may want to use this new version:
  • Monitoring the file count in each Blue Iris storage folder may help to avoid sluggish file management (possibly starting at ~10,000 files; see this ChatGPT query). This includes impacting the performance of this Powershell script!
  • If you routinely protect clips/alerts, then you should pay attention to the ratio of READ-ONLY files and increase the folder storage allocation accordingly
  • Windows File Explorer displays file timestamps in the CURRENT local timezone; therefore the time shown for old files may be off by an hour from their actual created time. V8 shows the file's actual creation timezone of in the Oldest column (e.g., PST/PDT)
  • New arguments that enable the on-demand overriding of default user-settings (-NoTimestamp and -NoPruning). I use the -NoTimestamp argument when executing the script the console, and use timestamping only when running the script from Task Scheduler.
  • A new argument that enables the easy purging of all archived output tables (-ClearArchive)
The screenshots below highlight the changes in the script's output.
V8.output_1.png V8.output_2.png

and the revised usage guide via the -Help argument
V8_usage_guide.png

NOTE: If you are already using V7.1, then you can continue to use your existing user-settings file.

Changelog:
  1. NEW: added stats for the quantity of READ-ONLY (protected) files in each folder
  2. NEW: added timezone designator to the oldest and newest date columns
  3. NEW: added argument -NoTimestamp to override the time stamping of the output CSV files
  4. NEW: added argument -NoPruning to disable the pruning of old CSV files
  5. NEW: added argument -ClearArchive to delete archived (old) CSV files on demand
  6. NEW: script now checks if the commandline contains unsupported argument(s)
  7. CHANGED: now showing file CreationTime (previously LastWriteTime) in output table's 'Oldest' & 'Newest' date columns
  8. CHANGED: now showing time as HH:MM instead of HH:MM:SS in output table's 'Oldest' & 'Newest' date columns
  9. CHANGED: eliminated redundant TOTAL row from output tables if the folder contains only one item
  10. CHANGED: eliminated 'Oldest' & 'Newest' entries from the output table's TOTAL row
  11. CHANGED: function PurgeOldFiles() now gets existing files ordered oldest to newest
 
Last edited: