1
\$\begingroup\$

Part 1. I have two camera sources. 1 Mobile which produces IMG_20180618_035708.jpg files 2.Panasonic Lx7 which outputs P1910846.jpg

So, I would like to be able to bulk rename the P1910846.jpg to display date/time, but KEEP the orig name too. eg.to rename to> '20180618_035708 P1910846.jpg'

I am guessing I need to somehow READ #Exif date/time..then...ADD that data to the filename? Is there a tool whereby I can highlight the images and press GO. And it just does it. OR Would I need to code somehow to extract then add that data to each file?

Part 2. Within the above process can I somehow remove the IMG_ tag too?

Thanks in advance, rob

\$\endgroup\$
2
  • \$\begingroup\$ Hard to answer without knowing which OS you use: Windows? OSX? Linux? \$\endgroup\$
    – xenoid
    Commented Jul 15, 2023 at 16:07
  • \$\begingroup\$ you can build custom names during copying (or after) with all sorts of parameters using Photo Mechanic. \$\endgroup\$
    – dandavis
    Commented Jul 16, 2023 at 5:30

3 Answers 3

2
\$\begingroup\$

Using exiftool, you would use this command to prefix the date time to the file name

exiftool -d "%Y%m%d_%H%M%S" "-Filename<$DateTimeOriginal %f.%e" /path/to/files/

The -d (-dateFormat) option is used to format the time stamp to your example. See ExifTool Common Date Format Codes for the list of date % variables.

DateTimeOriginal is the most common time stamp of when the photo was taken set by the camera.

The %f is the base filename of the original file and %e is the extension.

The command to remove IMG_ from the beginning of the filename would be

exiftool "-Filename<${Filename;s/^IMG_//}" /path/to/files/

These commands would be for running under Windows CMD. If run on Mac/Linux then you would change the double quotes into single quotes so the command line doesn't see the $ as the start of a shell variable.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ This is a very nice description of using exiftool at the command line. I like how you described the purpose of each argument, rather than just throwing a complete command at a newbie with no explanation. \$\endgroup\$ Commented Jul 16, 2023 at 20:26
  • 1
    \$\begingroup\$ @GrantRobertson, Many thanks. I'm a mod over at the ExifTool forum and I try my best explaining commands, because many of the people who come there asking for help have little to no command line experience. A big pet peeve of mine is people who just spit out RTFM, when the person asking the question probably doesn't even know the correct term they should be looking for. \$\endgroup\$
    – StarGeek
    Commented Jul 17, 2023 at 18:43
1
\$\begingroup\$

Bulk Rename Utility is one of my favorite pieces of software. I'd never used this specific feature until just now, but it has the ability to read EXIF data as well to use date taken in renaming. It will also allow you to do anything you want to the filenames, including removing the IMG_ tag.

and it's free for personal use!

https://www.bulkrenameutility.co.uk/

\$\endgroup\$
1
\$\begingroup\$

At the risk of sounding like a broken record, I'm going to suggest IMatch (photools.com). I use Bulk Rename Utility for lots of other things, and I love it. But it didn't turn out to be as powerful and flexible as I needed it to be for my needs. And I couldn't be sure that it was grabbing the exact EXIF data field that I wanted to use. IMatch let's you choose fields based on the actual, official EXIF field name.

I suggest that you go ahead and give Bulk Rename Utility a try and see if it works for you. But, if you need more, and are willing to spend $130, then you might try IMatch. (It does a lot of other handy stuff too.)

\$\endgroup\$
2
  • 1
    \$\begingroup\$ I am really impressed but the exiftool command line provided by @Stargeek. IMatch actually uses exiftool, in the background, to do all of its metadata modifications, so it can guarantee said modifications are done in a standardized way. Though it does make things a little easier than the command line, because (once you have a script set up) you can just select your images and run the script in a couple of clicks. I now suggest you try StarGeek's command before investing in IMatch. \$\endgroup\$ Commented Jul 16, 2023 at 20:33
  • 2
    \$\begingroup\$ Big upvote for IMatch, it's what I use. But I usually advise using Digital Asset Management (DAM) programs if at all possible. Image metadata is a Universe of Madness (video metadata is a Multiverse of Madness) and DAMs provide easy interface without having to worry about the exact details. \$\endgroup\$
    – StarGeek
    Commented Jul 17, 2023 at 18:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.