Page 1 of 1

Deleting folders with specific contents

PostPosted: Sat Jan 30, 2016 2:44 am
by Woody
Hey folks,

I'm fiddling around since two days now but I can't wrap my head around the rule to do what I want:

I made a rule that folder contents of new downloaded and extracted stuff are moved to specific folder, so movie files go to the movie folder, sound files to a sound folder and so on.
Another rule deletes the remaining empty folder after one day. So far so good.

This is what it looks right now:
Image

But some of the folders have a txt or a jpg file in it. How would a rule look like to get rid of those folders, too?

Re: Deleting folders with specific contents

PostPosted: Mon Feb 01, 2016 11:37 am
by Mr_Noodle
How would those folders be differentiated from other folders you don't want thrown away? If there is only one file in it? Is it only txt and jpg?

The basic mechanism you would need is to use a nested condition. Hold down the option key while clicking + button to create a new condition. There, you can set the target to any/all sub-files. Any conditions under that will apply to sub-items in the folder while the rule as a whole still applies to the folder. You are basically matching a folder based on its contents. Combined with the answers to the above questions, you should be able to put something together that works.

Re: Deleting folders with specific contents

PostPosted: Tue Feb 02, 2016 1:57 am
by Woody
Thank you a lot for your help!

With the nested rules it worked.