Make Alias of Folders that Contain More Than 1 Movie

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

Moderator: Mr_Noodle

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.
Jobauma
 
Posts: 3
Joined: Tue Sep 15, 2009 10:50 pm

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?
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado

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.
Jobauma
 
Posts: 3
Joined: Tue Sep 15, 2009 10:50 pm

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.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

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.
Jobauma
 
Posts: 3
Joined: Tue Sep 15, 2009 10:50 pm


Return to Support