Mr_Noodle wrote:For AppleScript/JavaScript, you can export attributes back to Hazel
Are these pre-defined attributes, or arbitrary ones?
I had a look at the help, but I couldn't really see much, other than the 'attributes' which the OSX file system uses
BTW, is there a reason why you have a script to rename and move files? Is there a reason why you aren't using Hazel's built-in actions to do that?
I do try to limit to it Hazel where possible. Maybe I don't understand how to fully command Hazel rules, but if I take the simplest examples I can think of....
1) A file triggers a rule, and I want to rename it with a bit of substring'ing but also convert any spaces to underscores
Ie, "
SomeCompany - My Invoice 23674.pdf" -> "
20161022_SomeCompany_23674.pdf"
Then run further rules on the resulting file
Cannot find a way to do this purely in Hazel, so I have to shell out to a script and then do everything else in bash too.
2) A file is found in a directory (using OSX Folder Actions)
I have a script to scp it to a server, but making sure I do not overwrite any file with the same name.
So "
My Invoice 23674.pdf" will become "
20161022_SomeCompany_23674.pdf" and then scp'd, but that already exists
So the ultimate scp destination might end up being "
20161022_SomeCompany_23674_2.pdf"
3) Finally, I have a setup which allows me to drag a bunch of PDF's pages into a directory, and it will amalgamate them into a single PDF.
I would love to be able to return the amalgamated PDF filename back to Hazel to use in subsequent rules
Thanks