Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

andrewakessler

macrumors newbie
Original poster
Mar 6, 2013
2
0
Hello, I'm trying to figure out how I can create an applescript that changes the color of a movie file upon download to a series of nested folders, and then removes the color label upon opening.

In simple terms:

Upon download, movie file is automatically placed in:

TV folder
Show Title folder
Season folder

Applescript notices new movie file in folder / subfolder

set color label of movie file to orange

when movie file is opened, script removes color label.

Is this even possible?

Thanks for the help.
 

andrewakessler

macrumors newbie
Original poster
Mar 6, 2013
2
0
How about a script for changing a color label when a file has been opened? Is this possible?
 

kryten2

macrumors 65816
Mar 17, 2012
1,114
99
Belgium
A folder action created in Applescript or Automator would do the first part.

Code:
on adding folder items to this_folder after receiving these_items
	-- insert actions here
	-- Put logic into script to move files to desired location and attach color labels to files based on name extension or something else.
	-- insert actions here
end adding folder items to


For the other part perhaps you can use the value of the kMDItemLastUsedDate attribute of the mdls command and work with that(see attached tumbnail). For more information on the mdls command --> In Terminal :

Code:
man mdls

Info : http://hints.macworld.com/article.php?story=20070408193708936
 

Attachments

  • Picture 14.png
    Picture 14.png
    72.1 KB · Views: 120
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.