This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |