• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Action that can read and put metadata from CSV file?

Explorer ,
Feb 15, 2017 Feb 15, 2017

Copy link to clipboard

Copied

HI,

I just need to create an action that do:

1) read 1st column of CSV file

2) find the file named the same as the test in the 1st field of CSV

3) insert all column data into the appropriate meta field

then save the psd file

4) export same psd file as a JPG and PNG while maintaining the meta info

Is this something that Photoshop can do that?

Thanks in advance!

TOPICS
Actions and scripting

Views

10.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Feb 15, 2017 Feb 15, 2017

Copy link to clipboard

Copied

An Action can not do what you want to do. You would need to program a Photoshop Script not record and edit a Photoshop Action.

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 15, 2017 Feb 15, 2017

Copy link to clipboard

Copied

Yeh Mack, I were also thought that this can be done via js coding.... any clue please? I am comfortable with js in Photoshop?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 15, 2017 Feb 15, 2017

Copy link to clipboard

Copied

Adobe's scripting supports most of JavaScript Applescript and VSB and Adobe DOM covers some of Photoshop features. Where it does not you can use Action Manger Code Recorded by the Sciptlistener Plugin.  So you would use JavaScript normal file system support to read/write your CVS file and Adobe DOM code to read/write  a Document xmpMetadata.

Documantation Adobe Photoshop Scripting | Adobe Developer Connection

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 16, 2017 Feb 16, 2017

Copy link to clipboard

Copied

Here you go (I can’t help with all of your request):

Prepression: Extracting Metadata to .CSV

(Last paragraph has info on injecting metadata from .CSV)

Once you have used a Bridge script or ExifTool to import the .CSV metadata into the batch of PSD files, then use Image Processor Pro to create the JPEG and PNG versions. PNG may or may not support the metadata though…what is the exact metadata field that you wish to import?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 16, 2017 Feb 16, 2017

Copy link to clipboard

Copied

Detailed instructions here:

 

Need a script to update keywords for 20000 images in Bridge

 

 

P.S. It is hard to make specific suggestions without understanding:

 

1) Which exact metadata fields

 

2) Seeing a copy of the . CSV data

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 16, 2017 Feb 16, 2017

Copy link to clipboard

Copied

Hi Stephen_A_Marsh, thanks for  your interest on this action. here I attaching csv, psd file link for review actually All PSD files generated based on data set to be batch processed and saved as PSD by the name of the field "v_Filename_Extension" and PSD files generated in action contain all the metadata in the correct places as per the csv also All individual keyword PSD files to be batch processed and saved as PNG with metadata

Dropbox - master_1920x1082_withVariables_v8.psd

Dropbox - MASTER_PSD_META_IMPORT_v8_meta_import.csv

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 16, 2017 Feb 16, 2017

Copy link to clipboard

Copied

mirza5313 areyou also mirzaa26404547 ?

If so what you posted here look like Data Driven Graphics not anything related the a document xmp metadata.

Your CSV first row has 23 variable names however, all of the following rows do not have 23 fields. The last filed seems to be a file path in the rows and would not always match up with the header variable name in column 23. Your PSD template look like it may have more than 22 text replacement layers I did not check all layers the see which are defined as variable for there are things used in the document nor include in what you uploaded to dropbox...

Capture.jpg

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 16, 2017 Feb 16, 2017

Copy link to clipboard

Copied

Your CSV mostly looks OK, however I think that I can spot a few potential formatting issues and some column headers that I am not sure of in their destination mapping.

Are you Mac or Windows based? My guess is Win…

First you will need to install the venerable ExifTool software.

Next, run the following command line code on a sample file that has metadata in your required fields to find out what the ExifTool metadata fields are titled:

exiftool -a -G1 -s "path\to\file\here.psd"

Such as:

exiftool -a -G1 -s "C:\Username\Desktop\master_1920x1082_withVariables_v8.psd"

Or perhaps this will serve you better:

exiftool -a -G1 -s -csv "C:\Username\Desktop\master_1920x1082_withVariables_v8.psd" > "C:\Username\Desktop\metadata output.csv"

Which should output a text file of all of the metadata in your PSD sample. Then you will need to replace the column headers in your current file with the column headers generated by the ExifTool CSV output.

Come back once you have changed over the column headers and we can then go through the other issues that I spotted in your file.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 17, 2017 Feb 17, 2017

Copy link to clipboard

Copied

Here are a variety of scripts the DIY custom meta data is the script that has the ability to do all that I am asking, it just does not work in latest version of Adobe CS bridge..

The VRA script also has the same ability, but cant choose which fields to populate so 2nds choice, but they both supposed to read a tab or csv file and find the image and inject meta data...

Please review AND tell me any possibility that how can these script works?

Dropbox - previous scripts.rar

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 17, 2017 Feb 17, 2017

Copy link to clipboard

Copied

Paul put his script on GitHub - Paul-Riggott/PS-Scripts: Photoshop Scripts make sure you have his latest DIY custom metadata script.  Not though he stated nor of the scripts were tested with CC...

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Feb 17, 2017 Feb 17, 2017

Copy link to clipboard

Copied

The DIY Metadata script works fine in the latest version of Bridge. Have you checked the errlog ? Error Log.txt is created in the folder that the script was run.

Another thing is that the first field in the csv file must be the file name (no path), you must also select the folder/top level folder where the files reside.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 17, 2017 Feb 17, 2017

Copy link to clipboard

Copied

This is why many use ExifTool, it is highly configurable and is not dependent on having a specific version of Bridge or requiring an end user to understand scripting if a certain field is not available. Whether one uses a Bridge script or ExifTool – some planning, testing and work is required by the end user in order to reap the benefits of the chosen tool.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 18, 2017 Feb 18, 2017

Copy link to clipboard

Copied

Fully agree with the last sentence.

Speaking for ExifTool is that it is blazingly fast, and therefore well suited for bigger number of files to be processed.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 18, 2017 Feb 18, 2017

Copy link to clipboard

Copied

I just tried to work with ExifTool but i am not familiar with this any idea how to use?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 18, 2017 Feb 18, 2017

Copy link to clipboard

Copied

I previously provided a link to the installation instructions. Is the software installed?

 

If you need help with the command line, then try here (there is also some Mac info there too, despite the title):

 

Getting started: Command-line ExifTool in Windows

 

 

Did you look at my post #9?

 

1) In the command prompt window, just type in:

 

exiftool -a -G1 -s -csv "

 

2) Then drag-n-drop your test file into the command prompt to populate the path to the file, you should then have a result like this:

 

exiftool -a -G1 -s -csv "C:\Username\Desktop\master_1920x1082_withVariables_v8.psd

 

3) Then add a straight double quote to complete the path (if there are no word spaces in the path, then the straight double quotes are not required):

 

exiftool -a -G1 -s -csv "C:\Username\Desktop\master_1920x1082_withVariables_v8.psd"

 

4) Next you will need to add a space and then the greater than character and a space to inform ExifTool that you wish to output the contents of the file to a file:

 

exiftool -a -G1 -s -csv "C:\Username\Desktop\master_1920x1082_withVariables_v8.psd" >

 

5) Finally, you will need to add the path and filename of the .csv file that you wish to output:

 

"C:\Username\Desktop\metadata output.csv"

 

 

6) So the final complete command would be similar to this:

 

exiftool -a -G1 -s -csv "C:\Username\Desktop\master_1920x1082_withVariables_v8.psd" > "C:\Username\Desktop\metadata output.csv"

 

Windows:

 

 

cmd-prompt.png

 

Mac:

terminal.png

 

 

7) Then press enter!

 

Once ExifTool has created a .csv file from a file with sample metadata, you can open it into a spreadsheet and look at the column headings. Copy/paste these ExifTool column headings into your existing .csv file replacing the appropriate headers.

 

Example:

 

Your original spreadsheet column V header was titled DC_Keywords and it would be renamed as XMP-dc:Subject

 

As I mentioned, after the headings are transplanted, you will have some other work to do as your example .csv is not yet correct for importing as there are issues with the data.

 

Please post a file download link when you have copied over the ExifTool column headings into your sample spreadsheet, then we can talk about the other issues in your spreadsheet and how to fix them.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 18, 2017 Feb 18, 2017

Copy link to clipboard

Copied

Thanks Stephen_A_Marsh​for this detailed instructions, unfortunately I have done at step 7 and press enter nothing happen just exiftool disappeared? I have try till step seven and press enter but no output file?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 18, 2017 Feb 18, 2017

Copy link to clipboard

Copied

What happens if you just type exiftool at the command prompt and hit enter?

I am guessing that this is either a simple installation or command syntax issue.

Did you copy the exiftool(-k).exe program to C:\WINDOWS and rename it to exiftool.exe ?

Can you provide a screenshot of where you have installed ExifTool and a screenshot or copy of the command text being entered?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 18, 2017 Feb 18, 2017

Copy link to clipboard

Copied

Please see snap shot this time when i enter commands and hit enter another message appear also i just copied exiftool to windows directory and renamed... Capture1.PNGCapture2.PNGafter hit enter.PNG

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 18, 2017 Feb 18, 2017

Copy link to clipboard

Copied

It appears that you have typed:

eixftool

When you should type:

exiftool

Also, only a single set of straight double quotes:

-csv "C:\

Not:

-csv ""C:\

And finally, ensure that there is a space either side of the > character.

Be careful with copy/paste from external sources into the command prompt, as straight quotes can become curly, ensure that the quotes are straight. If there are no word spaces in your filepath, then there is no need to enclose the filepath in open/close quote marks, it is just good form to do so otherwise when you do have word spaces you might forget.

Once you fix these basic syntax errors it all should work fine!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 19, 2017 Feb 19, 2017

Copy link to clipboard

Copied

Please see snap shot same message, I have uninstalled and than reinstalled exiftool but no change?

Capture.PNG

After Enter...

after enter.PNG

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 19, 2017 Feb 19, 2017

Copy link to clipboard

Copied

This look like the Command hung did not complete

Capture.PNG

This stated the command is not installed

after+hit+enter.PNG

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 16, 2017 Feb 16, 2017

Copy link to clipboard

Copied

As an alternative approach, you might consider using Exiftool, an extremely powerful command-line application.

This is actually what the article referenced in the previous message refers to…

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 19, 2017 Feb 19, 2017

Copy link to clipboard

Copied

The message means that exiftool is not installed into your systems environment execution path.  The system can not find the executable exiftool program.  Either add the folder to your system path variable or change directory  to the folder that exiftool is installed in before you enter the the command line command.

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 19, 2017 Feb 19, 2017

Copy link to clipboard

Copied

I have checked exiftool is exist in c:/windows directory path but dont know why exiftool not workng

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines