Solved

ExifTool output file name

Posted on 2014-04-29
6
477 Views
Last Modified: 2014-05-06
Hi,

Does anyone here use ExifTool?

I'm trying to search hundreds of files for the keyword 'Description' and then output the name of a file that contains the keyword.

Executing "exiftool * | grep Description" gives me the line in the file but not the name of the file that contains the line.

Thank you
0
Comment
Question by:DarthElmo
  • 3
  • 3
6 Comments
 
LVL 51

Expert Comment

by:Bill Prew
Comment Utility
Have you tried something like this:

exiftool * | findstr /i /c:"======" /c:"description"

Open in new window

~bp
0
 

Author Comment

by:DarthElmo
Comment Utility
Hi Bill,

Thanks for your response. I'm running this on UNIX, so I'm using grep instead of findstr. But the heart of the issue is that by default, the file name and Description are output on two separate lines like the two below.

File Name                       : [Name of file listed here]
Description                     : [a long string here]

ExifTool is very robust and I'm fairly certain there's a way to make ExifTool pass the file name along with the Description line but so far I have been unsuccessful.

Thanks again
0
 
LVL 51

Assisted Solution

by:Bill Prew
Bill Prew earned 400 total points
Comment Utility
Okay, have you tried the -csv option?  It will write the output in a CSV file format with one line per file.  You can combine that with selecting the tag names you want such as:

exiftool -s -csv -filename -comment > output.csv

~bp
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Accepted Solution

by:
DarthElmo earned 0 total points
Comment Utility
Hi Bill,

Thank you for that recommendation. That would work. I received another recommendation at another site that gives me exactly what I need, though:

exiftool -p '$filename $description' -r -q -q . | awk '{print $1}'

I'll accept both as solutions.

Thanks again.
0
 
LVL 51

Expert Comment

by:Bill Prew
Comment Utility
Great, glad you got to a working solution.

~bp
0
 

Author Closing Comment

by:DarthElmo
Comment Utility
This solution came from a recommendation at another site.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
This article will show, step by step, how to integrate R code into a R Sweave document
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now