# CrushTaskExample6

#### Delete subfolders but keep root folders.

This example finds all the root home folders in a particular location.&nbsp;&nbsp;Then one by one looks inside of them to find old files to be deleted…but keeps the parent home folder.&nbsp;&nbsp;To do this it uses a trick to export to a text file the list of root folder names, then reads that back in and uses that list to process each one, one at a time.

![Root folder contents cleanup](CrushTaskExample6/Root_folder_contents_cleanup.png)

You can download the job configuration and slightly adjust the paths in it for your needs.

[attachments](CrushTaskExample6/job.xml)
