Keywords From CSV
Script for Adobe Photoshop
Latest update 8/22/2023, version 5.2
The script reads CSV spreadsheet data for file names and keywords, searches a selected folder for the files, and updates the keywords.
For metadata fields beyond simply keywords, consider the related script Metadata from CSV.
- Update unique keywords for each file
- Add, replace, or remove keywords
- Process any number of images
- Include subfolders
- Match name exactly or without extension
Before using the script
The script requires a spreadsheet of file names and keywords, saved as Comma Separated Values (CSV format). The spreadsheet must have at least two columns, one for image file name, and another for the keywords.
The first row is the header, which identifies the contents of each column. In this example, the column for file is labeled File name, and the column for keywords is labeled Keywords. Each row contains the file name in the first column, and the keywords in the second column. These columns could just as well be labeled “image” and “tags,” for example, or any other desired labels. The precise column labels, or their order, are not important, and there is no harm in extra columns. Which column is the file names, and which is the keywords, are selected in the script interface.
Image file names do not need the full path, only the file name. In the script interface, the folder where images are located is selected, and its path is added to arrive at the actual location of each image. If file names are only base name (file name without extension), be sure to enable the script option Match file name only, without extension, described in the section How to use the script, section 3 Options.
The keywords column contains one or more keywords. Separate multiple keywords with a comma or semicolon.
How to use the script
The interface has three sections: Data file, Images folder, and Options. 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. If problems occur, a log file is written at the location of the data file and the user is notified.
Section 1: Data file (CSV)
Delimiter — the character that separates columns of the data file. The default is comma, normal in the United States. Some European countries use semicolon rather than comma. Select the delimiter used in your region of the world.
File — select the CSV data file, then the column drop-down lists (next) are loaded with the columns discovered in the data.
Column file name — select the column of image file names.
Column keywords — select the column of keywords.
Section 2: Images folder
Folder — select the folder of images to process. Each image file name in the spreadsheet data that is found in this folder 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.
Section 3: Options
Add keywords — preserves current keywords and appends to them keywords in the keywords column.
Replace keywords — current keywords are removed and keywords in the keywords column are added. Keep in mind when using this option, for any row (image) in which the keywords cell is empty, keywords are replaced with nothing, so in that case, existing keywords are removed.
Remove keywords — current keywords that appear in the keywords column are removed. Any existing keywords that do not appear in the keywords column remain untouched.
Keywords From CSV
Change log: keywords-from-csv.txt
For help installing scripts, see How to Install and Use Scripts in Adobe Creative Cloud Applications.
IMPORTANT: scripts are developed for the latest Adobe Creative Cloud applications. Many scripts work in CC 2018 and later, even some as far back as CS6, but may not perform as expected, or run at all, when used in versions prior to 2018. Photoshop features Select Subject and Preserve Details 2.0 definitely fail prior to CC 2018 (version 19) as the features do not exist in earlier versions. For best results use the latest versions of Adobe Creative Cloud applications.
IMPORTANT: by downloading any of the scripts on this page you agree that the software is provided without any warranty, express or implied. USE AT YOUR OWN RISK. Always make backups of important data.
IMPORTANT: fees paid for products purchased from this site, or for programming custom solutions, are the purchase of a non-exclusive license to use the software and do not grant the purchaser any degree of ownership of the software. Author of the intellectual property and copyright holder William Campbell retains 100% ownership of all code used in all products and custom solutions.