apply copyright notice to photos in a folder

I started to learn applescript last week…and I of course have problems…could someone helps ?

how could I apply this script to a folder that contains hundreds of photos?

tell application “Adobe Photoshop CS”
set docInfoRef to info of current document
set copyright notice of docInfoRef t"tralala"
end tell

Thanks in advance

Jeanfl

See my comments…

tell application "Finder" to set theFiles to files of (choose folder) as alias list --asks the user to choose a folder, and make a list of the files from that folder

tell application "Adobe Photoshop CS"
	activate
	repeat with eachFile in theFiles --repeat with each of the files from the folder
		open eachFile
		tell current document
			set copyrighted of info to copyrighted work --this puts the © symbol in the document's title bar in PS
			set copyright notice of info to "tralala"
			close saving yes
		end tell
	end repeat
end tell

This script will work, assuming all the files in your chosen folder can be opened with Photoshop.

Adding copyright information to the metadata by itself is not going to protect your images as it is easy to strip out the metadata information. If you really wanted to protect your copyright you could draw some text or apply a watermark onto your image (not the original of course) which is a much stronger level of protection.

iMagine Photo can be used to apply watermarks or draw text onto the image, and it can also be used to set the metadata copyright information, all much faster than using photoshop.

To add a copyright message to the metadata see (assumes jpeg):


on AddCopyrightToFile(copyrightMessage, theFile)
  tell application "iMagine Photo"
    set thisImporter to import graphic theFile
    tell thisImporter to make exporter with properties {export file type:"JPEG", export file location:theFile}
    set the export exif user data of thisImporter to theFile
    set the export exif data of thisImporter to {{exif type:copyright, exif unicode: copyrightMessage}}
    export thisImporter
    close thisImporter
  end tell
end AddCopyrightToFile

iMagine Photo is free.

Thanks for your help and advice

I am going to try them