Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: Remove the 'downloaded file' warning flag' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Remove the 'downloaded file' warning flag
Authored by: magnamous on Nov 18, '07 02:28:15PM

Although I like the warning when I open a program for the first time, if I've decided to keep it I don't want to be warned every time I try to open it thereafter, so I think this hint is great. But instead of having it as a folder action (which effectively obliterates the feature completely), I prefer it as an Automator Finder plug-in, which allows me to change the setting for an individual application that I've decided to keep. For anyone who's interested, here's how I made it (based off of the code in the original hint):

Create a new workflow in Automator and pick Get Selected Finder Items as the first action. Drag Run AppleScript in as the second one, and paste in the following lines:

on run {input, parameters}
	
	repeat with i from 1 to count of input
		
		set thisInput to quoted form of POSIX path of item i of input
		
		do shell script "xattr -d com.apple.quarantine " & thisInput
		
	end repeat
	
end run

Now choose "Save as Plug-In" from the File menu, make sure the Finder is selected as the plug-in type, and give it a name (I named mine "Remove Quarantine Flag").

Do keep in mind that you have to have permissions set on the file you're trying to modify such that you can write to the file. This script will silently fail if you don't have write access to the file. I'd like to include a prompt for administrator authentication, but I don't know how to do that. If anyone does, please jump in with a solution.



[ Reply to This | # ]
10.5: Remove the 'downloaded file' warning flag
Authored by: palahala on Dec 26, '07 01:35:50AM
if I've decided to keep it I don't want to be warned every time I try to open it thereafter

Like someone else wrote earlier: I only get the warning once, in a quite intelligent manner. If you're getting the warning each time you open the file then some bug might be bothering you.



[ Reply to This | # ]
10.5: Remove the 'downloaded file' warning flag
Authored by: tempel on Oct 13, '10 03:42:46AM
Update: In 10.6, this should be created as a Service, not a Workflow, as 10.6 does not offer the option to save it as a Finder plugin any more.

As a service, the "Get Selected Finder items" step is not necessary any more - instead one configures the Service at the top to receive selected "files or folders" in "Finder.app".

I also suggest to wrap the "do shell script" line between a "try" and "end" so that it will not abort the processing of a larger selection when a single selected file is not quarantined.

[ Reply to This | # ]

10.5: Remove the 'downloaded file' warning flag
Authored by: kopf on Nov 14, '10 08:10:10PM

To be able to do this on files that you don't have privileges for, simply append 'with administrator privileges' (without the quotes) at the end of the do shell script line. AppleScript will then present a dialog asking for your admin password.



[ Reply to This | # ]