Solved

ExifTool output file name

Posted on 2014-04-29
6
498 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 55

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 55

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
Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

 

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 55

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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…

729 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