Page 1 of 1

Script to Get ParentPath

PostPosted: Sat Oct 27, 2012 3:11 pm
by audiomac
Hi,

I have an idea for a function I'd like to implement with Hazel but I need to script it and unfortunately I'm next to useless with Applescript.

I want to get the location of a file (parentpath I think) and save that to the spotlight comments of that file, so that when I then move the file, I can move it back to it's original location using that info.

So, how the hell do I do that?

Thanks in advance for any tips

Re: Script to Get ParentPath

PostPosted: Mon Oct 29, 2012 1:59 pm
by Mr_Noodle
Hopefully someone else will chime in with more specifics as this is outside of the support I give. As far as the Hazel-specific stuff goes, you can export the parent path as a custom token which you can then use in the comment action's pattern. Search the help for applescript for more details.