7

Is it possible to modify which files Apple's quarantine warning pops up on? Specifically I download hundreds of PHP files (web developer) and I'm tired of seeing "...is a script application downloaded from the Internet. Are you sure you want to open it?" I don't mind the warning on most downloads, but don't want warnings on scripts I'm opening to edit.

FYI, Quarantine can be completly disabled with: defaults write com.apple.LaunchServices LSQuarantine -bool NO and can be removed from existing files with: xattr -d -r com.apple.quarantine ~/foldername

2 Answers 2

3

If you download files from the internet into the ~/Downloads folder, you could assign a folder action to ~/Downloads via Automator:

Open Automator Create a new Folder Action

As the action, drag over "Run Shell Script"

Assign the following shell script:

    for f in "$@"
    do
        test "$f" == *\.php && xattr -d -r com.apple.quarantine $f
    done
1
  • 1
    Hmm this might work, but the problem isn't files going to /Downloads, it's all my Git repos and sites. I could set it up to run on those folders recursively I suppose. /Downloads is actually the one places I'd like to it run.
    – jb510
    Commented Sep 10, 2011 at 18:38
2

Building from @Daniel's answer, you could do this from a shell:

find /path/to/your/app -name '*.php' -exec xattr -d -r com.apple.quarantine {} \;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .