Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

ExifTool output file name

Posted on 2014-04-29
6
487 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 53

Expert Comment

by:Bill Prew
ID: 40031108
Have you tried something like this:

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

Open in new window

~bp
0
 

Author Comment

by:DarthElmo
ID: 40032242
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 53

Assisted Solution

by:Bill Prew
Bill Prew earned 400 total points
ID: 40032617
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
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 

Accepted Solution

by:
DarthElmo earned 0 total points
ID: 40035396
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 53

Expert Comment

by:Bill Prew
ID: 40035612
Great, glad you got to a working solution.

~bp
0
 

Author Closing Comment

by:DarthElmo
ID: 40043943
This solution came from a recommendation at another site.
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

856 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