Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

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
share|improve this answer
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 Sep 10 '11 at 18:38

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 {} \;
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.