Mac|Life

How to Make Hazel work for you

-

Make a folder

Create a destinatio­n folder called Archive in your Documents folder. Go to Hazel. Under Folders, click +. Select the target folder you wish to pull content from. If you use subfolders, you also need a rule so Hazel won’t ignore them.

Check for folders

Click + under Rules, and call the new rule ‘Check for folders’. Set the condition to ‘Kind is Folder’, and the action to ‘Run rules on folder contents’. Subsequent rules will run on folders inside the one you’ve chosen.

Add a second rule

Add a rule: ‘Create archive’. Add the condition ‘Kind is Text’, to match text documents; add a second, ‘Date Added is after Date Last Matched’. This stops Hazel manipulati­ng unchanged documents it has already filed.

Define actions

Set the first action to ‘Copy to folder Archive’. This will send matching items to the folder created in step 1. Now to sort them into date-based subfolders. Add a second action, starting with ‘Sort into subfolder’.

Choose a pattern

Click inside the ‘with pattern’ field. Click the ‘date created’ token to add it to the pattern. Click the token’s downwards-facing arrow and select Edit Date Pattern. Remove -31 (so folders will use YYYY-MM). Click Done.

Set options

Click Options and use the ‘Replace’ option if you want updated files to replace those in the archive. ‘Rename’ creates many copies of files that you actively work on — counteract this with a condition to ignore today’s files.

Set a folder target

We’ll now move to our second folder — one full of PDF invoices with identifyin­g numbers comprising a word followed by a four-digit numerical code, such as maclife000­1. (Adapt what follows to suit your own documents.)

Target documents

Add the condition ‘Extension is pdf’ to target PDFs. We now need to create a token to find documents that contain the code mentioned in the previous step. To start, create a second condition: ‘Contents contain match’.

Use a token

Click inside the match field and, in the pop-up, click the Custom Text token to add it. Give it a memorable name (we’re using Mac|Life ID). We now need to define the attribute that Hazel will search for in the PDFs.

Define the attribute

For this example, we said we would search for the word ‘maclife’ followed by some numbers (which could be anything). In Hazel, this is achieved by typing ‘maclife’ into the attribute field and clicking the Number token.

Add renaming action

Create an action, ‘Rename with pattern’, to prefix the existing filenames with the token’s value. The pattern will default to a hyphen followed by a name and an extension. Click just before the hyphen, click your token to insert it.

Adjust and test

Adjust the pattern to suit, with spaces and other elements. Click Done and OK, then test your rule. Matching PDFs will be renamed using your pattern. Now expand these concepts to other items you usually have to file by hand!

 ??  ??
 ??  ??
 ??  ??
 ??  ??
 ??  ??
 ??  ??
 ??  ??
 ??  ??
 ??  ??
 ??  ??
 ??  ??
 ??  ??

Newspapers in English

Newspapers from Australia