Script to Get ParentPath

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Script to Get ParentPath 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
audiomac
 
Posts: 3
Joined: Sat Oct 27, 2012 3:06 pm

Re: Script to Get ParentPath 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.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support