Graph-IT

remove_old_files.php

This scripts deletes files inside a folder which are older than 'time-string'.

Usage:

remove_old_files.php folderpath time-string

Parameters:

Side note: We use this script once a week to delete old files, from our 'pdf printer'-folder, which are older than 14 days.

# Clean 'PDF printer'-folder (delete files older than 14 days)
22 0 * * 6 <path to remove_old_files.php> <path to pdf-printer-folder> "-14 days"