Adding colour label to non-empty folder

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

Moderator: Mr_Noodle

Adding colour label to non-empty folder Sat Apr 06, 2024 10:08 am • by myotis
I've seen the earlier post from 2011, but I can't get the ideas presented there to work.

Eventually, I would like a rule that adds a red label to a folder when it contains files and remove that label (ie no label) when the folder is empty.

I've tried the suggested:

if all of the following conditions are met

Kind is Folder
Size is greater than 0kb

Set color label "red" (red is ticked)

I haven't got as far as trying to reverse this action for an empty folder because I can't get this first bit to work.

I've also tried putting the files in a subfolder, in case this rule was looking for a sub-folder inside the folder the rule was being applied to. The files are currently in the same folder as the rule is being applied to.

I have also tried a few other combinations,but I'm not able to get a red label applied to the folder.

I then tried the subfolder rule option:

with If any of the following conditions are met,
with a subfolder rule
If any of the following conditions are met for "any file or folder in the same folder" (but cycled through all the options
Size is greater than 0kb

set color label to red

I can't get this to work either. I assume I am missing the obvious?
myotis
 
Posts: 6
Joined: Thu Apr 04, 2024 6:22 am

Re: Adding colour label to non-empty folder Sun Apr 07, 2024 4:12 am • by myotis
I can't check right now, but there is a possibility I had actions paused, which is why nothing is happening when a save a rule.

I need to check when I get back to the computer.
myotis
 
Posts: 6
Joined: Thu Apr 04, 2024 6:22 am

Re: Adding colour label to non-empty folder Sun Apr 07, 2024 6:39 am • by myotis
It seems I am adding the label to the files inside the folder and not to the folder itself. Is there a way to add the label to the folder?

The simple

Kind is folder

Number of of items is not 0

Set color label "red"

is working, except for the labelling files rather than the folder.

I hadn't picked up on being for labelling files.
myotis
 
Posts: 6
Joined: Thu Apr 04, 2024 6:22 am

Re: Adding colour label to non-empty folder Mon Apr 08, 2024 8:54 am • by Mr_Noodle
Rules operated on the contents of the folder being monitored. You can't have rules apply themselves to the monitored folder itself. For that, you will need to monitor one folder up.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron