Unquarantine Script: I can't get this to work in Hazel?

From your noodle to other noodles. Talk about ways to get the most from Hazel. Even exchange recipes for the cool rules you've thought up. DO NOT POST YOUR QUESTIONS HERE.

Moderators: Mr_Noodle, Moderators

http://www.macosxhints.com/article.php? ... 9151619619

Does anyone know how to get that script to work in hazel? it keeps giving me these applescript errors via growl when I use it on my Downloads folder .... :(
ljun
 
Posts: 2
Joined: Thu May 15, 2008 6:27 am

That script is specifically made for folder actions. You would need to adapt it to the handler signature Hazel uses (check the help for a script template).

Looking at it, all this script does is calling a shellscript program. Instead you could do a shell script directly like the following:

Code: Select all
#!/bin/sh

xattr -d com.apple.quarantine $1


Save that to a file and then hook it up to the "Run Shellscript" action.
Mr_Noodle
Site Admin
 
Posts: 8623
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Should I apply that shell script for "any file"?

Does that mean it rescans all the files in the folder everytime there's a new file added, or just when new files are added?

I saved a plain-text file with the code above as "test.sh" but it wouldn't let me pick it as a valid shellscript in hazel?

thanks for the script mod :P
ljun
 
Posts: 2
Joined: Thu May 15, 2008 6:27 am

It's up to you to decide which files to apply it to. It scans when files are added as well as periodically. You can look at the logs to get a sense of when it runs.

One thing I forgot to point out is that the shell script has to be set to be executable. I'm not sure how you do this in Finder but on the commandline you can use the "chmod" command on the file. Something like "chmod 755 <the file>" (where <the file> is the file in question) should do it.
Mr_Noodle
Site Admin
 
Posts: 8623
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Tips & Tricks - DO NOT POST QUESTIONS