Deleting folders with specific contents

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Deleting folders with specific contents 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?
Woody
 
Posts: 10
Joined: Thu Mar 28, 2013 7:05 am

Re: Deleting folders with specific contents 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.
Mr_Noodle
Site Admin
 
Posts: 11875
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Deleting folders with specific contents Tue Feb 02, 2016 1:57 am • by Woody
Thank you a lot for your help!

With the nested rules it worked.
Woody
 
Posts: 10
Joined: Thu Mar 28, 2013 7:05 am


Return to Support