This answer will describe how not to get the following message when you open a file downloaded from Safari for the first time.
Well, I'm not sure why you're seeing this, but if your files are going to the ~/Download folder, you will have to tell the Operating System that you want that folder out of the quarantine.
Open your Terminal.app (Spotlight for Terminal) and type:
xattr -d -r com.apple.quarantine ~/Downloads
You might have to do it as super user (in which case, use this instead of the above), so if the above fails try with sudo before the command:
sudo xattr -d -r com.apple.quarantine ~/Downloads
note: You will be asked for your password if you use sudo, this is normal.
What is xattr?
The xattr command can be used to display, modify or remove the
attributes of one or more files, including directories and symbolic
links. Extended attributes are arbitrary metadata stored with a file,
but separate from the filesystem attributes (such as modification time or
WARNING: By doing the above, the OS will stop caring about files put in the Downloads folder. If you want to only do this for certain files, you will have to download your "safe" files elsewhere and execute the above command in that folder.
If you want to undo the operation, simply remove the -d
xattr -r com.apple.quarantine ~/Downloads
The -r is to make it recursive (so existing files and folders are also modified).
UPDATE I've realized that new files will be put in quarantine when you download them, so although the above command will go file by file and remove the flag, so you don't have to tell the OS that the file is safe every time, in order to completely disable the mechanism, you have to execute an extra command. please make sure that this is ok with you, since you can't do this for single files, it's an all or nothing.
To Disable the warning dialogs completely for any files in the future, execute this command (Again, I'm not 100% sure if you need sudo, just try without it first.:
defaults write com.apple.LaunchServices LSQuarantine -bool NO
And if you ever want to revert the change:
defaults write com.apple.LaunchServices LSQuarantine -bool YES
I can't recall if you need to logoff/logon again or reboot.
Good luck and be careful with those downloads. :)
A restart IS required after these commands.
Link attached for further reading on the Quarantine.