Page 1 of 1

Make Alias of Folders that Contain More Than 1 Movie

PostPosted: Tue Sep 15, 2009 11:24 pm
by Jobauma
I have tried some different combinations of attributes, but I'm starting to suspect it is necessary with a script for this to work. Unfortunately I do not understand how to make scripts. The best I can do is to edit parts of already made scripts in rare cases where I'm able to see the logic behind it...

...so yes, I'm going to be rude and ask if somebody else could make one for me. ;) Hopefully one day I won't need to ask about this again.

Re: Make Alias of Folders that Contain More Than 1 Movie

PostPosted: Sun Sep 20, 2009 1:23 am
by a_freyer
Could you describe a little more what you're trying to do? What is the rule sequence that you are implementing that is not creating the proper aliases? What do you want instead?

Re: Make Alias of Folders that Contain More Than 1 Movie

PostPosted: Wed Sep 23, 2009 8:13 am
by Jobauma
Well, I do not remember what I did trying to make it work. However I do have the script to re-target a rule to point to the parent folder, which means I'm halfway there:
Code: Select all
tell application "Finder"
   set posix_parent_dir to POSIX path of (container of (item theFile) as text)
   
end tell
return {hazelSwitchFile:posix_parent_dir}

...only thing is that I do not want an alias of the parent folder to be made before the folder contains more than 1 movie, so the amount of other types of files is irrelevant to the rule.

Thanks.

Re: Make Alias of Folders that Contain More Than 1 Movie

PostPosted: Wed Sep 23, 2009 11:27 pm
by Mr_Noodle
One thing to look at is the Spotlight attribute "Number of items" which is described as "Number of files and folders in the folder". If combined with "Kind is folder" you might be able to come up with something though requiring the files to be movies does complicate things. Otherwise, I think you'd have to use a script.

Re: Make Alias of Folders that Contain More Than 1 Movie

PostPosted: Thu Sep 24, 2009 7:45 am
by Jobauma
Thanks, Mr_Noodle. I tried this with "Kind is Movie" in addition, but as I have learned, to have "Kind is" twice doesn't make sense.

Looks like my future to be bright is dependent on someone elses hard work. But seriously, it'll be appreciated.