I\'m trying to write a python script to delete all files in a folder older than X days. This is what I have so far:
import os, time, sys path = r\"c:\\user
There's script which delete files only if you running out of space, this is good fit for logs and backups in production environment.
Delete old files will eventually remove all your backups if new backups are not being added
https://gist.github.com/PavelNiedoba/811a193e8a71286f72460510e1d2d9e9