Hello,
I'm a new user and am trying to get Hazel and Automator to work together to do the following:
1. When a new PDF file is dropped on a folder,
2. Open it with Preview,
3. Ask me to rename it,
4. Rename the file with the name I specify,
5. Move the newly renamed file to a folder with the same name, and
6. Add an RTF file to the new folder with the same name as the PDF file plus the word "Notes" at the end.
I'm using it to sort academic articles. So here's how I want it to work in practice [and what's happening in brackets]:
1. I add GARBAGENAMEPDFWITHLOTSOFMEANINGLESSNUMBERS to my "Article File" folder. [ok, this works.]
2. Hazel tells Automator to open it with Preview and ask me for a new name. [no problem here.]
3. Automator/Applescript asks me to rename the file with the Author Date syntax I specify from looking at the file (sadly, academic presses have not heard of PDF metadata.) [only problem here is that the window Automator opens doesn't receive the focus, so I have to use the mouse to activate it before I can type in the new name and file]
4. Automator changes the file name [works fine]
5. Automator moves the file to a new folder [but since I'm using the "New Folder" command, it also leaves a copy in the "Article File" folder, which triggers a loop in Hazel.]
6. Add an RTF file to the new folder with the same name as the PDF file [this works fine one way, but see below.]
One thing that would help is to split this up into discrete actions so that automator isn't trying to do everything at once and I don't end up with two copies of the file in step 5, which is what is triggering the loop. But to do that requires changing the Automator workflow so that it can accept whatever information Hazel is passing to it when the "sort into subfolder" action is selected. Is it passing the FILE itself to Automator? The POSIX address of the file? The newly created subfolder? I am stumped.
Thanks.
J