Something simple (?) – change case of Finder files

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

Moderator: Mr_Noodle

Hi all,

I was a regular, if light, user of Hazel a number of years ago and have recently returned to it (v5) in an effort to manage some of the messiness of my filing system :-( (Re)dipping my toe a bit into the Hazel waters, I seem to be making a basic error on what should be a simple renaming rule.

My preference is that all files stored on my macOS 12.5 MacBook Pro (Intel) that *I've* created should be in lowercase. What I'm trying to do is auto-case change the case of new files dragged to the Desktop – say, bookmarks from a browser, or attachments from emails – to lowercase. I've written a short rule that *should*, if I'm understanding the process involved, do that - and it *does* seem to work, but not all the time and that's the issue for me. The rule looks like this…

If all the following conditions are met

Kind is Document
Date Added is after Date Last Matched

Do the following to the matched file or folder:

Rename with pattern name [lowercase] extension [lowercase]

As I said, this appears to do just what I'm after, but only irregularly, and I can't figure out what are the conditions that are tripping it up.

Any advice would be most welcome.
tharpold
 
Posts: 7
Joined: Sun Nov 02, 2008 2:08 pm

Try going through the troubleshooting guide here: https://www.noodlesoft.com/kb/hazel-tro ... ing-guide/

Report back with the results.
Mr_Noodle
Site Admin
 
Posts: 11236
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

OK… I've figured out, I believe, what was amiss with the unexpected behavior of the rule described in my post, above. Once I determined it, the issue was fairly obvious if still a bit odd to my way of thinking.

A browser bookmark is not a *document* in Hazel parlance. It's a "Web internet location". Which of course makes sense in a narrow way, but I had assumed that a bookmark is both a thing that web browsers fiddle with and a document more generally, sort of a square-rectangle situation, if you will. After all, a "Photoshop document" is both a "document" and a… Photoshop document; I could use either criterion to match in Hazel, depending on how narrow I want the matching to be. I don't know if this is a peculiarity of Hazel or more generally of the macOS, but it does seem to me an odd inconsistency in the use of the definition of "document".

So, if I add a second Hazel rule to my Desktop folder, with the criterion – Kind is Web internet location – then the files that I most often drag to the Desktop, browser bookmarks and, er, "documents" – files of pretty much all kinds other than bookmarks – are both changed to lowercase by one of the two renaming rules now applied to the dragged files. Perhaps there is another not-a-document category of files that I haven't discovered yet, but I wrote the rule(s) primarily for bookmarks and documents, so I haven't encountered that yet.
Last edited by tharpold on Mon Jul 25, 2022 11:53 am, edited 1 time in total.
tharpold
 
Posts: 7
Joined: Sun Nov 02, 2008 2:08 pm

BTW, viewing the Hazel logs in real time helped me to spot this. Basically, Hazel logged that it had "Done processing folder Desktop" when a non-lowercase bookmark was dragged to the folder, without changing the Finder name, and also when a text file or the like (not a bookmark) was dragged – "Done processing folder Desktop" – but then the Finder name would be changed. So I started looking around for another sort of criterion that would apply *only* to bookmarks, and found "Web internet location".

Dunno why I didn't look at the logs before, except that this distinction (a bookmark is not a "document") hadn't occurred to me.
tharpold
 
Posts: 7
Joined: Sun Nov 02, 2008 2:08 pm


Return to Support