Solved

ExifTool output file name

Posted on 2014-04-29
6
491 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
[X]
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
  • 3
  • 3
6 Comments
 
LVL 54

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 54

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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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 54

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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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)

733 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