I've finally progressed to the point where I have been able to start playing around with a few more complex rules, including the use of custom tokens.
Thanks in particular, to this workflow iro NoteTakerHD: http://technosavvy.org/2012/09/02/autom ... ith-hazel/
Now I've hit a bit of a dead-end, and would appreciate some thoughts.
What I want to do:
[Sort into subfolders] from a variety of files that have been downloaded automatically from my iPad.
The [filename] has been set in a specific manner in the iPad app, to include "tags" as the last string of the filename. It is this "tag" that I am using as the [custom token] to [sort into subfolders].
The first part of the [filename] is allocated by me - and this is where things get tricky.
The [filename] string is as follows:
(Variable filename)_NoteTakerHD_Date & Time_TAG.pdf
I have set up the rule using custom icons as follows:
http://dl.dropbox.com/u/48750317/Screen ... 7%20PM.png
- Code: Select all
abc_NoteTakerHD_•File Year-•File Month-•File Date-•Hour-•Min-•Sec_•TAG
The TAG is in reference to how the file is "tagged" in NoteTakerHD on the iPad.
I have created similarly named [subfolders] - and have successfully managed to get Hazel to [move], [label] and [sort] the files into each [subfolder], with surprisingly little effort.
But here's the problem.
The above obviously only works if the (Variable filename) is only one word. Or alternatively, I name the file (in NoteTakerHD on the iPad) without using any spaces. If I use spaces in naming the file in NoteTakerHD - the filename comes out with (underscores) _ placed where the spaces were. Which obviously started messing with the Custom Token setup.
Now I could do that (have no spaces)- but would prefer not to, since I have plenty of files in the NoteTakerHD app, and it makes things easier to find, if I can keep the filename's sensible.
So for instance - I might have a filename simply called (Meeting), and have it tagged as "Project" - which the above rule would then send to my (Project) sub-folder. But I would hardly do that.
I would rather name the file (Site Meeting), tagged "Project" - or (Aspen Site Meeting), tagged "Project".
Which would be converted to: "Site_Meeting_NoteTakerHD_...." and "Aspen_Site_Meeting_NoteTakerHD_..."
So I then tried the following:
http://dl.dropbox.com/u/48750317/Screen ... 9%20PM.png
http://dl.dropbox.com/u/48750317/Screen ... 0%20PM.png
I "nested" the [Condition] as follows:
- Code: Select all
If (any) of the following conditions are met:
(Name) (matches) abc_NoteTakerHD_•File Year-•File Month-•File Date-•Hour-•Min-•Sec_•TAG
(or)
(Name) (matches) abc%abc_NoteTakerHD_•File Year-•File Month-•File Date-•Hour-•Min-•Sec_•TAG
(or)
(Name) (matches) abc%abc%abc_NoteTakerHD_•File Year-•File Month-•File Date-•Hour-•Min-•Sec_•TAG
(Then)...
This actually looked like it would work...
I figured it would allow for all 3 eventualities: "Meeting_NoteTakerHD_..." [or] "Site.Meeting_NoteTakerHD_..." [or] "Aspen.Site.Meeting_NoteTakerHD_..."
I could then simply use a period "." [or any other symbol, even the _ ] in naming the file, where there would have been a space - and in so doing, still make it easy to read/find/identity files when I was working in the NoteTakerHD app.
However... just as I thought I was in the clear....
Whereas the (FILENAME) problem was resolved, since the [nested conditions] actually worked, a new problem arose with the [•TAG].
The "second" [•TAG] in the nested condition appears to be automatically set by Hazel to become [•TAG 1], and the "third" [•TAG] automatically becomes [•TAG 2]... I cannot seem to change this.
Which means, when it comes to the [Rule] part, I am presented with the following:
http://dl.dropbox.com/u/48750317/Screen ... 6%20PM.png
- Code: Select all
[Move] to folder
[Set color label]
[Sort into subfolder] with patern: •Tag •Tag 1 •Tag 2
Naturally, I don't need to select all of them - but I have tried all of them in varying combinations...
The upswing of this is as follows:
Assume all 3 (filename) eventualities are present in my (watched folder), I have my (target folder) "/NoteTakerHD Files" and a (sub-folder) entitled "/Project" in my (target folder):
- Code: Select all
(Watched folder):
[1] "Meeting_NoteTakerHD_Date & Time_Project"
[2] "Site.Meeting_NoteTakerHD_Date & Time_Project"
[3] "Aspen.Site.Meeting_NoteTakerHD_Date & Time_Project"
(Target sub-folder):
/NoteTakerHD Files/Project
If I ONLY use [•TAG] in the Rule - then [1] "Meeting_NoteTakerHD_Date & Time_Project" is moved into (sub-folder) "/Project", and [2] and [3] are left in the parent-target folder (/NoteTakerHD files).
This is because [•TAG] only runs the 1st nested condition, presumably.
If, as in the last screengrab, I use [•TAG] [•TAG 1] [•TAG2] in the Rule, then Hazel does the following:
[1] "Meeting_NoteTakerHD_Date & Time_Project" INTO "/NoteTakerHD files/Project" (my creation)
[2] "Site.Meeting_NoteTakerHD_Date & Time_Project" INTO "/NoteTakeHD/ProjectProject" (HAZEL created)
[3] "Aspen.Site.Meeting_NoteTakerHD_Date & Time_Project" INTO "/NoteTakerHD/ProjectProjectProject" (HAZEL created)
I understand why Hazel is doing this.
The use of [•TAG] [•TAG1] [•TAG 2] is causing it to create a Folder by allocating the new folder's filename from the repeated use of the TAG descriptor in the original file.
I hope anyone that has actually read this far, has managed to follow what I've tried to demonstrate.
My simple question is as follows:
Can I get HAZEL to recognise the [•TAG] as being the same one - in other words, also treat [•TAG] as an (Or), like it does the (Variable Filenames) - and if this is not possible, how should I re-write my rule?
All I want, is for me to not be concerned with using a 1,2,3 worded (filename) in the iPad app, and have Hazel move any of those to ONE sub-folder, named in terms of that filename's "tag"....
Should I simply bite the bullet, and create 3 separate rules?
I'm quite prepared to - just wanted to check that I wasn't missing something simple, and thereby contribute to my learning the rules etc...
Thanks again!