Keywords From CSV
Script for Adobe Photoshop
Latest update 8/4/2022, version 4.5
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 relevant to 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
For help installing scripts, see How to Install and Use Scripts in Adobe Creative Cloud Applications.
Also available for hire to program custom solutions. Contact William for more information.
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.