Page 1 of 1

Hazel doesn't rename based on "Text content" element

PostPosted: Mon Feb 13, 2017 12:59 pm
by bonn
I created a .txt file with the content "This is a test". Then tried to get Hazel to Rename the file based on the pattern element Text Content (Pattern > Other > Text content). However, this doesn't work. Should it?

Also, in case that this function is actually supposed to work, it would be good to be able to truncate the content to a variable amount of characters, e.g. keep only the first 20 letters.

Image: https://imgur.com/a/JA168
Unfortunately couldn't paste it to the forum because it got too large for some reason.

Re: Hazel doesn't rename based on "Text content" element

PostPosted: Tue Feb 14, 2017 12:49 pm
by Mr_Noodle
That is provided by Spotlight though that one is special in that you can search on it but not actually view it. I would heavily advise against using Text Content in that fashion, though, as it can potentially a large amount of text into your filenames.

It might be better to use "Contents contain match" and create a custom attribute to match a portion of the contents. You can then use that to rename the file.