How can I add a document property and populate it based on a cvs file

Started by AnnieBrownTX, February 19, 2016, 01:24:42 PM

Previous topic - Next topic

AnnieBrownTX

I basically have thousands of files that have been renamed by bates numbers, and I want to add the original file name as a document property "title" so I can see both file names.  I have a spreadsheet with two columns:  Current File Name (which is the Bates Number) and Original File Name (which I want to add to the "Title" or "comments" document properties - whichever you think is easier.  I don't want to change the files at all, just add the new metadata.

Can your tool do this?

Help!  I'm going crazy searching....!!!
Annie

Phil Harvey

Hi Annie,

ExifTool could do this, but it doesn't have the ability to write metadata to most of the file types you require.  See the list of supported files for a complete list.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

AnnieBrownTX

Thank you so much for responding so quickly!

I don't understand your chart of supported types - It's been a long week, I'm sorry.

95% of the file types are .pdf and I can use ANY of the doc properties to add the original file name, it doesn't have to be Title.
I am attaching a screenshot of what I'm looking to achieve.

Again, please help!  I will be forever in your debt!  And will pay!!
Annie


Phil Harvey

For PDF files (and JPEG, TIFF, PNG, etc -- basically any file with "W" support in the table I linked for which you can also write XMP), this is easy and you can use XMP:Title.  To do this:

1) Change the first line of your CSV file to

SourceFile,Title

2) "cd" to the directory containing the files, and run this command (assuming that your csv file is called "my.csv" and is in the same directory as the other files):

exiftool -csv=my.csv .

- Phil

(BTW, the forum mails are being bounced by your server: "reason: 521-130.15.24.20 blocked by sbc:blacklist.mailrelay.att.net.", so I had manually activated your account.)
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

AnnieBrownTX


Phil Harvey

If they are in subfolders, then the proper path must appear in the SourceFile column.  Also, you would need to add the -r option.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).