Page 1 of 1

Renaming folder rule

PostPosted: Wed Oct 19, 2016 9:24 am
by Dennytwist
Hi! Is there a way for Hazel to identify that if it has a folder inside it it will perform a rule? I'm emphasising Folder here cause I don't want the rule to go off when populated with files but when it is populated with folders

Re: Renaming folder rule

PostPosted: Wed Oct 19, 2016 11:15 am
by Mr_Noodle
Rules apply to folders as well as files. You can use "Kind is folder" to match folders specifically and most other attributes and actions apply to them. If you run into any problems, post the specifics here.

Re: Renaming folder rule

PostPosted: Thu Oct 20, 2016 4:43 am
by Dennytwist
Okay, I want the folders to be upper cased if it has a folder inside them so you would know theres nesting inside it. So I figured I can choose:
Subfolder Depth -> is among the -> 1 lowest
But I get a Triangular sign with an exclamation mark inside it with an internal error saying:
An uncaught exception was raised. Choose "Continue" to continue running in an inconsistent state.

In Show detail specification it says:
Code: Select all
Exception Name: NSInvalidArgumentException
Description: +[ComNoodlesoft_HazelRuleController errorImage]: unrecognized selector sent to class 0x1146cc3c0
User Info: (null)

0   CoreFoundation                      0x00007fff84d5252b __exceptionPreprocess + 171
1   libobjc.A.dylib                     0x00007fff9942acad objc_exception_throw + 48
2   CoreFoundation                      0x00007fff84dd3c74 +[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3   CoreFoundation                      0x00007fff84cc4bf5 ___forwarding___ + 1061
4   CoreFoundation                      0x00007fff84cc4748 _CF_forwarding_prep_0 + 120
5   Hazel                               0x00000001145adcc9 Hazel + 285897
6   Hazel                               0x00000001145dfc4b Hazel + 490571
7   Hazel                               0x000000011464ed63 Hazel + 945507
8   Hazel                               0x00000001145dd2e4 Hazel + 479972
9   Hazel                               0x000000011458a52d Hazel + 140589
10  Hazel                               0x00000001145a65f9 Hazel + 255481
11  Foundation                          0x00007fff867465df __NSFireTimer + 83
12  CoreFoundation                      0x00007fff84cd1e14 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
13  CoreFoundation                      0x00007fff84cd1a9f __CFRunLoopDoTimer + 1071
14  CoreFoundation                      0x00007fff84cd15fa __CFRunLoopDoTimers + 298
15  CoreFoundation                      0x00007fff84cc9021 __CFRunLoopRun + 2065
16  CoreFoundation                      0x00007fff84cc85b4 CFRunLoopRunSpecific + 420
17  HIToolbox                           0x00007fff84269f6c RunCurrentEventLoopInMode + 240
18  HIToolbox                           0x00007fff84269da1 ReceiveNextEventCommon + 432
19  HIToolbox                           0x00007fff84269bd6 _BlockUntilNextEventMatchingListInModeWithFilter + 71
20  AppKit                              0x00007fff829605f5 _DPSNextEvent + 1093
21  AppKit                              0x00007fff830708eb -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1637
22  AppKit                              0x00007fff82954fbd -[NSApplication run] + 926
23  AppKit                              0x00007fff8291fa8a NSApplicationMain + 1237
24  libdyld.dylib                       0x00007fff99d08255 start + 1
25  ???                                 0x0000000000000001 0x0 + 1

Re: Renaming folder rule

PostPosted: Thu Oct 20, 2016 11:14 am
by Mr_Noodle
There's a bug right now with the preview when there's another error while evaluating the rule. Try checking the status UI (the "eye" button) instead.

That said, to do what you want, you'll probably need a nested condition. Read this article: https://www.noodlesoft.com/kb/how-to-cr ... onditions/

You'll want to add a nested condition like "If (all) are met for (any of its sub-files/folders), Kind is Folder". That would match a folder which contains a folder.