Deleting old files
The following command line script can be used for deleting old files from users home folders.
php cron/delete_old_files.php 2592000 admin confirm
2592000
is 30 days in seconds, admin
is the username of the account that is being cleaned and confirm
is needed for executing the task. If confirm
is omitted then the command will only simulate the action, showing you what will happen without actually deleting the files. If the username is omitted, the process will run for all user accounts in the system. 2592000
is the smallest value you can use, preventing you from deleting files younger than 30 days.
Important note: the date used for determining a file's age is the “modified” date, not the “created” date. If you have files created a long time ago, but were recently modified, they will not be deleted. For any other desired behavior, the file “system/modules/fileman/sections/cli/php/delete_old_files.php” is freely editable.
The action will not be logged inside FileRun, no notifications will be sent.