Posts Tagged “folder actions”

Der Haupt-Hass-Grund bzgl iTunes ist für mich klar die Tatsache dass man keinen zentralen Audio-Folder frei definieren kann, der damit automatisch im Sync mit der Meta-Daten-Verwaltung von iTunes ist. Thema wurde u.a. auch schon hier angesprochen

Read the rest of this entry »

Comments 4 Comments »

I have written about Leopards Quarantine flag for downloaded files some weeks ago.

During the research in those days i have found a nice idea by Henrik using folder Actions to solve that issue. Read here how he solved it.

I have tweaked his Folder Actions Script a little bit. Basicaly i have just added Growl Support. You can find the Folder Script Ignorantenprogramm here.

Ok, if you are new to Folder Actions that might sound like a way over your head, but it isn’t. Lets take a look how to use it.

Installation:

  • Download Ignoratenprogramm.scpt
  • Open Finder and goto “/Users/yourUsername/Library”
  • Create a folder “Scripts” if it is not already there
  • Open that new Scripts folder
  • Create a new folder “Folder Action Scripts”
  • Save Ignorantenprogramm to this new folder

Installation is done. To get Ignorantenprogramm working you need to define an Action Folder now.

Configure Folder Action:

  • Right-click the desired Folder (most likely your Download Folder)
  • Select “More”
  • Select “Configure Folder Actions”
  • Select your Download folder in the folder-column of Folder Action Setup window
  • Choose Ignorantenprogramm as script in the script column of Folder Action Setup window
  • Close the dialog

Using:

Now lets make a test.

Download a new file to your Download Folder. If the download has finished you should see a Growl notification that the quarantine flag of this file is ignored now.

The final test:

Open that new file and see if you still see the Mac OS X Leopard quarantine question.

Hope you enjoy it.

Edit: forgot to poste the code

Code:


– Ignorantenprogramm

– Description:
– * Ignoratenprogramm is an appleScript based Folder Action

– Function:
– Ignoratenprogramm deletes the quarantine flag of files stored into an folder
– using this Folder Action.

– basic idea:
– http://henrik.nyh.se/2007/10/lift-the-leopard-download-quarantine

on adding folder items to thisFolder after receiving addedItems

– repeat
repeat with anItem in addedItems
set anItem’s contents to (quoted form of POSIX path of (anItem as alias))
end repeat

– define
set AppleScript’s text item delimiters to ” ”

– save path as string
set myPath to addedItems as text

– run ignore command
do shell script “xattr -d com.apple.quarantine ” & myPath

– Output using Growl
try
tell application “GrowlHelperApp”
set the allNotificationsList to  ¬
{”Test Notification”}
set the enabledNotificationsList to  ¬
{”Test Notification”}
(register as application  ¬
“Ignorantenprogramm” all notifications allNotificationsList  ¬
default notifications enabledNotificationsList  ¬
) notify with name  ¬
“Test Notification” title  ¬
“Ignorantenrogramm” description  ¬
“quarantine niformation of file: ” & myPath & ” ignored.” application name “Ignorantenprogramm”
end tell
on error
– Problem using growl
display dialog “Ignorantenprogramm had problems using Growl with file: ” & myPath with title “Ignorant” with icon 1 buttons {”Ok”} giving up after 5
end try
end adding folder items to

Yeah that wasn’t that much work, but i was curious how easy it would be to use it myself. Guess my AppleScript focus should be back to Tierprogramm now.

Need more examples about using Folder Actions ? Check this link

Comments No Comments »

Apple has included a, lets call it strange, security feature in 10.5

Basically they flag files you have donwloaded from the web as quarantined. This means a dialog pops up the first time you launch/execute or whatever this file.

In some special cases this behavior could repeat itself with each file launch, but thats not the supposed way. It should only happen if the re-flag as un-quarantined does not work.

But back to the main topic. While this feature could make sense for usual users it just annoys me personally.

I was searching and finally found this article at http://henrik.nyh.se

A Vista-esque feature of OS X Leopard is that it tags web downloads (not just from Safari) as such and then warns you about running downloaded apps or scripts. Archived (e.g. zipped) files inherit the tag from their tagged container.

[Screenshot]

This is an annoyance to power users. Luckily, being a power user, I can do something about it. ;)

Read the full article here.

Solution is based on Apple Script and Action Scripting/Folder Actions

Comments No Comments »

1