Skip to main content
Known Participant
February 15, 2017
Question

Action that can read and put metadata from CSV file?

  • February 15, 2017
  • 8 replies
  • 13816 views

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!

This topic has been closed for replies.

8 replies

JJMack
Community Expert
February 19, 2017

Now what happens when  you run the command?   This is like pulling teeth.....

JJMack
mirza5313
Known Participant
February 19, 2017

same result..

JJMack
Community Expert
February 19, 2017

Please try to understand the message states that windows can not find the file exiftool.exe  You now show is in C:\windows  you never showed that windows is in your path by default it should be.

Try this.   At the command prompt    C:\Users\Mirza  Abdul Rahman>         type     CD C:\Windows

The command prompt should change from C:\Users\Mirza  Abdul Rahman>   to C:\Windows>

Now type exiftool

If you get the message download exiftool again and replace the exiftoot.exe you have ins Windows.

JJMack
JJMack
Community Expert
February 19, 2017

Please on a command line type Dir C:\windows\Exif*

post the output...  That message states that Windows does not find any EXIFTOOL.EXE or EXIFTOOL.BAT file in your execution path.

JJMack
mirza5313
Known Participant
February 19, 2017

here is snap shot for result. i have find any .bat file when extract exiftool?

JJMack
Community Expert
February 19, 2017

Right EXIFTOOL.EXE is not installed in C:\Windows it May be installed be C:\Windows\Exiftool\ 

The file exiftool.exe is not in C;\Windows\....

Add the fildet C:\Windows\Exiftool to your path.

JJMack
JJMack
Community Expert
February 19, 2017

If exitfool.exe is in your c:\Windows directory and that directory is in your environment %Path% variable and you type exiftool on a command line you should not get the message that it is not a command or bat file.

Just type exiftool if you get that message something you wrote is not right

Microsoft Windows [Version 10.0.15031]

(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\John J McAssey\AppData\Local\Temp>dir c:\Windows\Exif*

Volume in drive C is OSDisk

Volume Serial Number is 1A06-AFC3

Directory of c:\Windows

File Not Found

C:\Users\John J McAssey\AppData\Local\Temp>dir e:\exiftool\*

Volume in drive E is Seagate 4TB

Volume Serial Number is 18CB-CBF7

Directory of e:\exiftool

02/19/2017  09:46 AM    <DIR>          .

02/19/2017  09:46 AM    <DIR>          ..

02/19/2017  09:39 AM         6,093,423 exiftool-10.43.zip

02/16/2017  10:30 AM         8,217,468 exiftool.exe

               2 File(s)     14,310,891 bytes

               2 Dir(s)  3,443,599,273,984 bytes free

C:\Users\John J McAssey\AppData\Local\Temp>

JJMack
JJMack
Community Expert
February 19, 2017

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
mirza5313
Known Participant
February 19, 2017

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

JJMack
Community Expert
February 19, 2017

Did you rename exiftool(-k).exe to exiftool.exe  I have never used the tool I just not downloaded the zip file extracted the file amd rebamed it int my E||exiftool foder I just created. How did you install it into your windows folder show that exiftool.exe is in there and that C:\windows is in your path.

Microsoft Windows [Version 10.0.15031]

(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\John J McAssey\AppData\Local\Temp>Echo %Path%

C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live

;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DL

LShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\12.0\DLLShared\;C:\Program Files (x86)\Roxio\OEM\AudioCore\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Common Files\Adobe\AGL;C:\Pr

ogram Files (x86)\Skype\Phone\;%localappdata%\Microsoft\WindowsApps;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\WINDOWS\system32;C:

\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Fil

es (x86)\Common Files\Roxio Shared\OEM\12.0\DLLShared\;C:\Program Files (x86)\Roxio\OEM\AudioCore\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Java\jre1.8.0_25\bin\;C:\Program Files (x86)\QuickTime\QT

System\;C:\Program Files (x86)\Keditw\;C:\KeditW;C:\KedPro;C:\KeditW\Macros;C:\KeditW\Samples;c:\dosutil;C:\Users\John J McAssey\AppData\Local\Microsoft\WindowsApps;

C:\Users\John J McAssey\AppData\Local\Temp>exiftool

'exiftool' is not recognized as an internal or external command,

operable program or batch file.

C:\Users\John J McAssey\AppData\Local\Temp>e:

E:\>cd exiftool

E:\Exiftool>exiftool

NAME

    exiftool - Read and write meta information in files

RUNNING IN WINDOWS

    Drag and drop files or folders onto the exiftool executable to display

    meta information, or rename to "exiftool.exe" and run from the command

    line to access all exiftool features.

    This stand-alone Windows version allows simple command-line options to

    be added to the name of the executable (in brackets and separated by

    spaces at the end of the name), providing a mechanism to use options

    when launched via the mouse. For example, changing the executable name

    to "exiftool(-a -u -g1 -w txt).exe" gives a drag-and-drop utility which

    generates sidecar ".txt" files with detailed meta information. As

    shipped, the -k option is added to cause exiftool to pause before

    terminating (keeping the command window open). Options may also be added

    to the "Target" property of a Windows shortcut to the executable.

SYNOPSIS

  Reading

    exiftool [*OPTIONS*] [-*TAG*...] [--*TAG*...] *FILE*...

  Writing

    exiftool [*OPTIONS*] -*TAG*[+-<]=[*VALUE*]... *FILE*...

  Copying

    exiftool [*OPTIONS*] -tagsFromFile *SRCFILE* [-*SRCTAG*[>*DSTTAG*]...]

    *FILE*...

  Other

    exiftool [ -ver | -list[w|f|r|wf|g[*NUM*]|d|x] ]

    For specific examples, see the EXAMPLES sections below.

    This documentation is displayed if exiftool is run without an input

    *FILE* when one is expected.

DESCRIPTION

    A command-line interface to Image::ExifTool, used for reading and

    writing meta information in a variety of file types. *FILE* is one or

    more source file names, directory names, or "-" for the standard input.

    Metadata is read from source files and printed in readable form to the

    console (or written to output text files with -w).

    To write or delete metadata, tag values are assigned using the

    -*TAG*=[*VALUE*] syntax, or the -geotag option. To copy or move

    metadata, the -tagsFromFile feature is used. By default the original

    files are preserved with "_original" appended to their names -- be sure

    to verify that the new files are OK before erasing the originals. Once

    in write mode, exiftool will ignore any read-specific options.

    Note: If *FILE* is a directory name then only supported file types in

    the directory are processed (in write mode only writable types are

    processed). However, files may be specified by name, or the -ext option

    may be used to force processing of files with any extension. Hidden

    files in the directory are also processed. Adding the -r option causes

    subdirectories to be processed recursively, but those with names

    beginning with "." are skipped unless -r. is used.

    Below is a list of file types and meta information formats currently

    supported by ExifTool (r = read, w = write, c = create):

      File Types

      ------------+-------------+-------------+-------------+------------

      3FR   r     | DV    r     | K25   r     | OFR   r     | RSRC  r

      3G2   r/w   | DVB   r/w   | KDC   r     | OGG   r     | RTF   r

      3GP   r/w   | DYLIB r     | KEY   r     | OGV   r     | RW2   r/w

      A     r     | EIP   r     | LA    r     | OPUS  r     | RWL   r/w

      AA    r     | EPS   r/w   | LFP   r     | ORF   r/w   | RWZ   r

      AAX   r/w   | EPUB  r     | LNK   r     | OTF   r     | RM    r

      ACR   r     | ERF   r/w   | M2TS  r     | PAC   r     | SEQ   r

      AFM   r     | EXE   r     | M4A/V r/w   | PAGES r     | SO    r

      AI    r/w   | EXIF  r/w/c | MAX   r     | PBM   r/w   | SR2   r/w

      AIFF  r     | EXR   r     | MEF   r/w   | PCD   r     | SRF   r

      APE   r     | EXV   r/w/c | MIE   r/w/c | PDB   r     | SRW   r/w

      ARW   r/w   | F4A/V r/w   | MIFF  r     | PDF   r/w   | SVG   r

      ASF   r     | FFF   r/w   | MKA   r     | PEF   r/w   | SWF   r

      AVI   r     | FLA   r     | MKS   r     | PFA   r     | THM   r/w

      AZW   r     | FLAC  r     | MKV   r     | PFB   r     | TIFF  r/w

      BMP   r     | FLIF  r/w   | MNG   r/w   | PFM   r     | TORRENT r

      BPG   r     | FLV   r     | MOBI  r     | PGF   r     | TTC   r

      BTF   r     | FPF   r     | MODD  r     | PGM   r/w   | TTF   r

-- More  --

JJMack
Brainiac
February 16, 2017

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…

Stephen Marsh
Community Expert
February 16, 2017

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?

Stephen Marsh
Community Expert
February 16, 2017

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

mirza5313
Known Participant
February 16, 2017

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

JJMack
Community Expert
February 15, 2017

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
JJMack
Community Expert
February 15, 2017

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
Known Participant
February 15, 2017

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