There are many situations when you need tidy up file server. Once of the options is delete files older then some pice of time. Some times you need delete files which are modified or no access long time ago.
You can use manual script in Task scheduler or you can use File Management Tasks from FSRM in Windows Server 2012 R2 or above.
If you add new task, first you need add “Task name” and if you need description.
Next you need select scope. For example folder.
In next step you need select action. If you want delete files (not move) then you need to use Custom action. Custom action use some script to process files. I use command line script to delete files.
In my script del.bat is only:
Next you configure condition. For example:
and last one is Schedule. For example once per week:
That is all 🙂