# How to delete FileSet defined folders?

**URL:** https://www.finalbuilder.com/forums/t/how-to-delete-fileset-defined-folders/1780
**Category:** Discussion
**Created:** [June 14, 2011, 10:13am UTC](https://www.finalbuilder.com/forums/t/how-to-delete-fileset-defined-folders/1780 "2011-06-14T10:13:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![valve1900](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/v/edb3f5/32.png) [@valve1900](https://www.finalbuilder.com/forums/u/valve1900)
#### Post date: [June 14, 2011, 10:13am UTC](https://www.finalbuilder.com/forums/t/how-to-delete-fileset-defined-folders/1780/1 "2011-06-14T10:13:45Z")

</div>

I want to delete folders which are created before 14 days.

&nbsp;

I tried to use "FileSet define" to collect those folders and "FileSet Delete Files" to delete them.

&nbsp;

I received the error “Delete failed (Access is denied) ”, even the folder is empty.&nbsp; But I can use “Delete Directory” to delete any folder without any problem. So I don’t think that it is a permission problem.

&nbsp;

&nbsp;

&nbsp;

Thanks.

---

<div class="post-metadata">

### Author: ![stephen.ryan](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/f14d63/32.png) [@stephen.ryan](https://www.finalbuilder.com/forums/u/stephen.ryan)
#### Post date: [June 17, 2011, 5:53am UTC](https://www.finalbuilder.com/forums/t/how-to-delete-fileset-defined-folders/1780/2 "2011-06-17T05:53:00Z")

</div>

Hi   
  
 We do not allow deleting directories via the FileSet Delete action as a safety measure (would be quite easily to unintentionally delete data).   
  
 All you need to do to achieve this is to use the FileSet Iterator action and the Delete Directory action (you will need to enable the Delete Tree option otherwise the action will fail if any of the directories are not empty) to loop through the list of selected folders and delete each of them.   
  
 Regards,   
 Steve

---

<div class="post-metadata">

### Author: ![valve1900](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/v/edb3f5/32.png) [@valve1900](https://www.finalbuilder.com/forums/u/valve1900)
#### Post date: [June 28, 2011, 11:00am UTC](https://www.finalbuilder.com/forums/t/how-to-delete-fileset-defined-folders/1780/3 "2011-06-28T11:00:25Z")

</div>

Thanks. It works.
