Skip to content

Instantly share code, notes, and snippets.

View aaw3's full-sized avatar
🐧

Allen Wolf aaw3

🐧
View GitHub Profile
@aaw3
aaw3 / win_fh_rename.py
Created January 10, 2024 01:25
Processes Windows File History Backup by getting latest file and deleting the older ones
#!/usr/bin/python3
# Solution inspired by: https://gist.github.com/kmorcinek/2710267
# This script will convert the date between the parentehsis and get the oldest date
# It will delete the older files and search all sub directories
# This definitely isn't the most efficient, but can process tens of thousands of files in less than a second
import re
from os.path import join