Au­to­mate tasks with Hazel

Learn how to use the pow­er­ful tools that lurk be­hind Hazel’s sim­ple in­ter­face

Mac Format - - IMPROVE -

Learn how to use the pow­er­ful tools that lurk be­hind Hazel’s sim­ple in­ter­face

Most of us know two facts about house­keep­ing; it’s nec­es­sary and it’s in­cred­i­bly dull. We know that clear­ing files and fold­ers from the desk­top, emp­ty­ing caches, ar­chiv­ing doc­u­ments and sorting out iTunes is im­por­tant to keep our Macs run­ning smoothly. But, frankly, who has the time, or come to think of it the in­cli­na­tion, to spend hours weed­ing out files and then fil­ing, trash­ing or re­nam­ing them?

For some, of course, this isn’t an is­sue. If you’re a whizz with Ap­pleScript, or love cre­at­ing new Au­toma­tor work­flows, you can au­to­mate much of the process and let it run by it­self with­out ever hav­ing to worry about it again. Most of us, of course, are not Ap­pleScript ge­niuses and while we can get our heads around Au­toma­tor, we of­ten don’t have the time to sort it out.

For­tu­nately for us there are a few third-party apps which can help, and one of our favourites is Hazel.

Hazel is a Sys­tem Pref­er­ences pane and, op­tion­ally, a menu bar icon. It has two states: on and off. When it’s run­ning, it will ex­e­cute all the rules you have cre­ated and set to run. Once you’ve cre­ated rules, you can check and uncheck them to dic­tate whether or not they ex­e­cute when Hazel is turned on.

One thing worth not­ing is that while Hazel runs in the back­ground, many of the tasks it car­ries out make vis­i­ble al­ter­ations to your Mac. So, for ex­am­ple, if you have a rule which pe­ri­od­i­cally ex­am­ines the desk­top and sweeps files into a sub­folder in­side your Doc­u­ments folder so you can deal with them later, you’ll no­tice the files sud­denly dis­ap­pear from your desk­top when the rule is ex­e­cuted. This can be dis­con­cert­ing, but it’s noth­ing to worry about. It just means Hazel is do­ing its job prop­erly.

The other thing to note is that Hazel ex­e­cutes your rules on a folder by folder ba­sis. So when you cre­ate a rule, you first need to spec­ify the folder to which the rule should ap­ply. If you want a rule to act on ev­ery file, no mat­ter where it’s stored in your user ac­count, how­ever, you can choose your home folder.

There are lots of sam­ple rules to help you get started when you first in­stall the app. It’s worth­while open­ing them up and pok­ing around to see how they are put to­gether. That will al­low you to see how rules are con­structed and give you ideas for cre­at­ing your own.

To load the sam­ple rules, click on Hazel in the bot­tom group in Sys­tem Pref­er­ences, or se­lect Open Hazel… from Hazel’s menu bar icon. Next, click on a folder in Hazel’s left-hand pane, and then click on the gear icon at the bot­tom of the win­dow. Now click ‘Load Sam­ple Rules’. Click on any rule in the right-hand pane and then click the pen­cil icon at the bot­tom of the win­dow. You can now see ex­actly what the rule does and the pa­ram­e­ters it uses. To add ex­tra con­di­tions or ac­tions, click on one of the ‘+’ but­tons to the right of an ex­ist­ing con­di­tion or ac­tion.

The con­struc­tion of rules will be familiar if you’ve ever built a Smart Playlist in iTunes. You start with one con­di­tion and one ac­tion, and you can add more. You can match against all, any or none of the con­di­tions, and add ad­di­tional groups of con­di­tions – such as to ex­clude un­wanted files that share cer­tain at­tributes – by hold­ing å and click­ing the el­lip­sis (‘…’) but­ton that ap­pears next to your ex­ist­ing con­di­tions.

Hazel has one other trick up its sleeve: it man­ages your Trash. Un­der its Trash tab are sev­eral op­tions. You can elect to delete ev­ery­thing that’s been in the Trash for more than a week, or tell Hazel to keep your Trash folder be­low a cer­tain size. You can also set it to delete all the files as­so­ci­ated with an app when you trash that app, which saves you cre­at­ing a Smart Folder to find those files or even buy­ing a ded­i­cated app to do that job. Kenny Hemphill

Who has the time to spend hours weed­ing out files and then fil­ing, trash­ing or re­nam­ing them?

Hazel can per­form a wide range of ac­tions on files added to a folder, pro­vided they match your con­di­tions.

Hazel can find pat­terns in files, and you can re­use those pat­terns in the ac­tions you take, such as re­nam­ing files.

Newspapers in English

Newspapers from Australia

© PressReader. All rights reserved.