CM Batch MMedia Date Changer. Correct image creation and modification date and time. CM Batch JPG Date Changer. Chang the Creation, Modification and EXIF Date. Discover New Mac Apps. Save money with MacUpdate Shop & keep your Mac software secure and up-to-date with MacUpdate Desktop. Batch MMedia Date Changer v1.83 Released April 19, 2021; ComboTIFF for Windows v2.49 Released April 12, 2021; Memory Pictures Viewer v1.47 Released April 12, 2021; Memory Pictures v1.49 Released April 12, 2021; Batch JPEG Rotator v2.54 Released April 12, 2021; iRedSoft Image Resizer v5.55 Released April 9, 2021; JBatch It v6.78 Released April 9, 2021. CM Batch JPG Date Changer supports not only changing the Creation, Modification but also the EXIF Date.
April 18, 2018I have thousands of photos in a perfect, organized state with correct EXIFmetadata. However, this was not the case couple of years ago.
Not all of my photos had proper EXIF data. Some had EXIF metadata but wereincorrectly named, some didn’t have EXIF metadata, but I knew the time they weretaken and most of them had filenames with random numbers based on the camerashutter count.
Because I didn’t like the state of all my photos, I’ve decided to fix them.During this time, I’ve gathered a set of small, short code pieces that allowsme to change anything on a set of photos.
Before we dive in, please be cautious with the commands, some of them aredisastrous. Always do a backup before you start working manipulating the data.One final reminder, all the commands are only used on macOS, it might bedifferent based on what OS you use.
Now, let’s dive in:
Install tools
exiftool is a command linetool that allows you to change and manipulate the EXIF metadata of images. On macOSyou can easily install it with:
detox is a utility designed to clean upfilenames. It replaces difficult to work with characters, such as spaces, withstandard equivalents. It will also clean up filenames with UTF-8 or Latin-1 (orCP-1252) characters in them (i.e: foo bar - quz.avi
-> foo_bar-quz.avi
).This will come handy for scripting because you don’t have to escapewhite spaces in your files. To install:
Make a backup of your photos folder
Instead of using cp
, it’s better to use a tool that is faster and copesbetter with file permissions. To make a backup of your photo folder run:

These flags mean:
v
increases verbosity.a
applies archive settings to mirror the source files exactly, includingsymbolic links and permissions.E
copies extended attributes and resource forks (OS X only).progress
provides a countdown and transfer statistics during the copy
Remove all white spaces in filenames
Assuming all your photos are in one place, to remove all white spacesrecursively, run the following:
Find images without an EXIF metadata

The first mistake when editing batch EXIF metadata is assuming that all images haveEXIF metadata. That’s not always the case. To find all images (in JPEG
) withoutany date run the following, recursively:
verify:
Set EXIF date based on file modify date
Suppose a photo does have an incorrect date or no EXIF metadata. But you know thatthe modified date of the file is correct because that’s is the date the photowas created. To update the EXIF date based on this date, call:
Change EXIF date by shifting timezone
Sometimes I forgot to change the time of my camera when I travel and I shoot inmy local timezone. When this happens, I have to change all my photos and updateit with the correct timezone. The following examples shifts the time by -11hours (suppose local time is 10:00 PM, Photos will be adjusted to 11AM(previous day)). Change it according to your own needs:
Set the file modification date based on EXIF date
With the previous action, the EXIF date might be correct, but now the modified date is set to the date the tool was invoked. To fix the modified date of the file that was destroyed with the previous action, run:
Set EXIF date based on the file name
If you have a file with the name foo_20180418_103000.jpeg
(which is in the formatYYYYmmdd_HHMMSS
), but the EXIF date is incorrect, you can update the EXIF date from the filename with:
The format needs to be similar to the format above
Set file name based on the EXIF date
If you have a correct EXIF date, you can easily rename all files based onthe EXIF date of the file:
Set file name based on the file modified date
If you have a correct modified date, you can easily rename all files based onthe modified date of the file:
Rebuild and fix corrupted EXIF metadata
Sometimes exiftool refuses to operate on a photo because of the EXIF metadata beingcorrupted. To fix all photos recursively, run:

Filter out non JPEG files
Your photos/
folder might contain various kind of data, such as videos, gif,png images, etc.. Let’s filter out all non JPEG files.
The file
let us find the mime type:
gives us this:
let’s pipe it to awk
to get the filename:
Cm Batch Jpg Date Changer Converter

gives us:
to strip last char (:
) we use substr

this gives us:
To pick up files that are not of mime type image/jpeg
, we can use $NF
builtin variable, which prints the last field in a line and compare it toimage/jpeg
. If it’s not equal to it, we’re going to continue parsing thefile:
which gives us:
Now to list all files with inside the current directory you should run:
combining this with the awk
directive above and direct the result to afile called nonjpeg.txt
, we get:
As a bonus, this is how you can iterate over the files in nonjpeg.txt
andmove it to a new folder called others
:
Recursive action: * vs .
Some of the example above uses *
or .
for selecting all files recursively.The difference is that *
is a bash expansion. If you have hundreds of files,this won’t work as it fails after a threshold. Using .
is better, because inthat case exiftool
automatically selects the files.
Moving without overwriting
You might want to move files to a folder after fixing the issues. It’s possibleto have a duplicate filename due to the way your EXIF metadata was created.
To avoid overwriting with mv
, use the -n
flag. This will not move if a fieldwith the same name exists. As a bonus, I also use -v so it shows me theprogress (this is not very useful actually as it’s moving very fast, but I seethat mv
is working when I use it in a script, iterating over thousands of files)
Find files newer than given date
You can use find
to get a list of files that are newer than the given data.For example, the command below will give you a list of all files that are newerthan Jun 18, 2017:
Cm Batch Jpg Date Changer Free
I’ve found these little snippets very useful for a folder with thousands ofunorganized photos with corrupted and missing EXIF metadata. These are meant tobe combined with each other depending on the files you have. Use one that fitsyour workflow.
Cm Batch Jpg Date Changer
If you have any questions or feedback, please feel free to share them with me on Twitter: @fatih
