Specifications

Table Of Contents
Adobe Photoshop CS6
JavaScript Scripting Reference JavaScript Object Reference 100
DocumentInfo sample Script
The following script sets document info (metadata) for all of the files in a specified folder and then saves
the modified files as low-quality JPEG images in a new folder without changing the originals.
Ask the user to specify the folder that contains the original files and the output folder for the JPEG
images, and then check that the folders exist.
Open each file and use the documentInfo object properties to tag it with the following metadata:
author: Adobe programmer
caption: Adobe Photo shoot
captionWriter: Adobe programmer
city: San Jose
copyrightNotice: Copyright (c) Adobe programmer Photography
copyrighted status: Copyrighted Work
country: USA
state: CA
Save the new documents in JPEG format with a low quality setting.
DocumentInfo.jsx
// Save the current preferences
var startDisplayDialogs = app.displayDialogs
// Set Adobe Photoshop CS6 to use pixels and display no dialogs
app.displayDialogs = DialogModes.NO
// ask the user for the input and output folders
var inputFolder = Folder.selectDialog("Select a folder to tag")
var outputFolder = Folder.selectDialog("Select a folder for the output files")
// see if we got something interesting from the dialog
if (inputFolder != null && outputFolder != null) {
// get all the files found in this folder
var fileList = inputFolder.getFiles()
parent
Document
Read-only. The info object's container.
provinceState
string
Read-write.
source
string
Read-write.
supplementalCategories
array of string
Read-write.
title
string
Read-write.
transmissionReference
string
Read-write.
typename
string
Read-only. The class name of the
referenced
info object.
urgency
Urgency
Read-write.
Property Value type What it is (Continued)