# Deletion of Old File

**URL:** <https://www.finalbuilder.com/forums/t/deletion-of-old-file/4323>\
**Category:** Discussion\
**Created:** [September 11, 2008, 4:36am UTC](https://www.finalbuilder.com/forums/t/deletion-of-old-file/4323 "2008-09-11T04:36:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![onyxintellect](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/o/48db29/32.png) [@onyxintellect](https://www.finalbuilder.com/forums/u/onyxintellect)\
**Post date:** [September 11, 2008, 4:36am UTC](https://www.finalbuilder.com/forums/t/deletion-of-old-file/4323/1 "2008-09-11T04:36:27Z")

</div>

I'm trying to find a method within Automize to delete files within a given directory that are older than X days. In trying to build a FileSet I don't see a way to filter the search to only get the files I want. I'm new to Automise so I could be going about it the wrong way. Any assistance in getting this done is appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![tate](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@tate](https://www.finalbuilder.com/forums/u/tate)\
**Post date:** [September 12, 2008, 1:00am UTC](https://www.finalbuilder.com/forums/t/deletion-of-old-file/4323/2 "2008-09-12T01:00:09Z")

</div>

Hi Taro,   
  
 You can use the Filters in the FileSet Define action to only include files older than a certain date. You need to generate that date though, so for this you can use the Get DateTime action or script code.
