Page 1 of 1

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

PostPosted: Thu May 15, 2008 6:29 am
by ljun
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 .... :(

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

PostPosted: Thu May 15, 2008 11:58 am
by Mr_Noodle
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.

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

PostPosted: Thu May 15, 2008 11:38 pm
by ljun
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

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

PostPosted: Mon May 19, 2008 3:26 pm
by Mr_Noodle
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.