Metadata From CSV

Script for Adobe Photoshop
Latest update 10/12/2021, version 1.7

The script reads CSV spreadsheet data for file names and metadata, searches a selected folder for the files, and updates the metadata.

This script is an expansion of the Photoshop script Keywords from CSV. A user asked for other metadata fields beyond only keywords. This script is the result.

  • Update unique metadata for each file
  • Process any number of images
  • Include subfolders
  • Match name exactly or without extension
Metadata From CSV
Metadata From CSV

You decide. Reward the author an
amount the solution is worth to you.

How to use the script

The interface has two sections: Data file (CSV), and Images folder. Select the data file, the columns to use, and the images folder. Enable the desired options, and click the OK button to begin. A progress bar is displayed while processing. When complete, the number of images processed is reported and a log file is written at the location of the data file.

Section 1: Data file (CSV)

File — select the CSV data file, a spreadsheet of at least two columns and any number of rows. The minimum columns are one for file name, and at least one column of metadata. There is no harm in extra columns. Which columns are the file names, and which are metadata, are chosen next. If file names are only base name (file name without extension), be sure to check the option (below) Match file name only, without extension.

Once the data file is selected, it is parsed to determine the columns and rows it contains. The next step is to select the column for file name, and the columns for metadata.

Column file name — the header of the column containing the file names.

Columns of metadata fields — in each drop-down list, select the header of the column that contains the desired metadata value to write to each image. Below are the available metadata fields the script can write to images:

When selecting columns of metadata, at least one must be selected. Any that are not set are ignored, and the script does not search the data for the column, and does not write to that metadata field. In the column for keywords, multiple keywords may be delimited with a comma or a semicolon. If comma, the cell must be wrapped in quotes otherwise the comma signals another column. For CSV saved from popular spreadsheet applications (i.e. Excel), this is handled automatically by the application.

For each column of metadata selected, the values from the data replace any existing metadata, provided the data cell is not empty. Because the script ignores empty cells, it is possible to write a metadata field for some images, but not others. For example, if the description column contains values for most images, but if some rows (images), the description cell is empty, for that image, that metadata field is ignored. Any existing value remains, rather than having it removed by replacing it with the empty value of the cell.

For keywords, consider the related script Keywords from CSV, which only updates keywords, but has the additional options of adding keywords, replacing keywords, or removing keywords.

Section 2: Images folder

Folder — select the folder of images to process. For any found in the folder that also appear in the file name column, the file is processed.

Match file name only, without extension — enable to match any file extension, or if the file name column lists only the base name (file name without extension). When enabled, file names with different extensions are considered a match, and are processed.

Include subfolders — files within subfolders are included in the search for images to process.

Metadata From CSV

License details included in download

For help installing scripts, see How to Install and Use Scripts in Adobe Creative Cloud Applications.

IMPORTANT: by downloading the script you agree that the software is provided without any warranty, express or implied. USE AT YOUR OWN RISK. Always make backups of important data.