How to delete old files – File Management Tasks

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.

File Management Tasks - Window

If you add new task, first you need add “Task name” and if you need description.

File Management Task - Name

Next you need select scope. For example folder.

File Management Task - Scope

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:

del %1
File Management Task - Custom action for delete files
File Management Task – Custom action for delete files

Next you configure condition. For example:

File Management Task - Conditions

and last one is Schedule. For example once per week:

File Management Task - Schedule

That is all 🙂

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.