maybe you need to remove old file or maybe you need to do this frequently so how we can do it.
if you are using the Linux as OS it will be easy for you just use below command :
tmpwatch -c 168 -v /path/to/folder
this command will remove files older then 1 week or 168 hours (7*24)
if you need to do it frequently you can use this command and cron job.
run crontab -e to open the cron job
after this add new cron job for example this command will add a cron job once a day
0 0,12 * * * tmpwatch -c 168 -v /path/to/folder
i wish remove old files after a while with linux help you