TOPIC: EXIFTOOL
Restoring photo dates with ExifTool after an Olympus camera loses its settings following a complete battery discharge
24th November 2025Here is the story behind what I am sharing here. My Olympus OM-D E-M10 II had been left aside for long enough to allow its battery to discharge fully. That also had the effect of causing it to lose its date and time settings. Then, I recharged the battery and went about using it without checking on those date and time settings. The result was a set of photos with a capture date and time of 1970-01-01T00:00 (midnight on New Year's Day in 1970!).
This was noticed when I loaded them onto my computer for appraisal with Lightroom. Thankfully, this had not gone on for too long, so I could work out the dates on which the images had been made. Thus, I could use ExifTool to update the capture dates while leaving the times alone. A command like the following will accomplish this while overwriting the images (the originals were retained elsewhere).
exiftool -overwrite_original \
-DateTimeOriginal='2025:06:02 ${DateTimeOriginal;s/^.* //}' \
-CreateDate='2025:06:02 ${CreateDate;s/^.* //}' \
-ModifyDate='2025:06:02 ${ModifyDate;s/^.* //}' \
*.ORF
The above command updates the original date, the capture date and the modified date. In practice, I only set two of these, leaving aside the modified date. Omitting the -overwrite_original switch would cause the creation of backup files, should that be what you require. Some think that specifying the *.ORF wildcard search is not desirable, preferring the following instead:
exiftool -overwrite_original \
-DateTimeOriginal='2025:06:02 ${DateTimeOriginal;s/^.* //}' \
-ext orf .
It is the -ext switch that picks up the ORF extension while . refers to the folder in which you are located in your shell session, and you can define your own path in the place of the dot if that is what is needed. Also, using -ext orf -ext dng will allow you to work with more than one file type at a time, a handy thing when more than one is found in the same directory, not that I organise my files like that.
With the date metadata fixed, removing the affected photos from Lightroom and reimporting them brought in the altered metadata. In the future, I will pay more attention to the Y/M/D display on the camera when it starts up, now that I realise what the display is trying to tell me. Then involves a trip to the settings using the Menu button on the back of the camera. Once in there, navigating to the spanner icon and then to the clock one gets you to the time settings where you can adjust it as needed. Pressing OK commits the setting to memory for the future, and you are then ready to go.
While on the subject of settings, the Info button is where you can set the levels to appear in the image display (on the viewfinder in my case); somehow I managed to lose these until I recalled how to get them back. Next on the list is another button that needs care on the top of the camera near the shutter release: one with a magnifying glass icon on there: this is the electronic zoom that has caught me out in the past. Naturally, other exposure settings dials also need care too, so it is never a good idea to rush the operation of a modern digital camera. Keeping their batteries charged will help too, especially in avoiding the predicament whose resolution led to the writing of this piece.
Protecting your photos with copyright metadata using ExifTool
8th July 2013There is a bill making its way through the U.K. parliament at this time that could reduce the power of copyright when it comes to images placed on the web. The current situation is that anyone who creates an image automatically holds the copyright for it. However, the new legislation will remove that if it becomes law as it stands. As it happens, the Royal Photographic Society is doing what it can to avoid any changes to what we have now.
Though there may be the barrier of due diligence, how many of us take steps to mark our own intellectual property? For one, I have been less that attentive to this and now wonder if there is anything more that I should be doing. While others may copyleft their images instead, I don't want to find myself unable to share my own photos because another party is claiming rights over them. There's watermarking as an object, yet I also want to add something to the image metadata too.
That got me wondering about adding metadata to any images that I post online that assert my status as the copyright holder. It may not be perfect, but any action is better than doing nothing at all. Given that I don't post photos where EXIF metadata is stripped as part of the uploading process, it should be there to see for anyone who bothers to check, and there may not be many who do.
Because I also wanted to batch process images, I looked for a command line tool to do the needful and found ExifTool. Being a Perl library, it is cross-platform so you can use it on Linux, Windows and even OS X. To install it on a Debian or Ubuntu-based Linux distro, just use the following command:
sudo apt-get install libimage-exiftool-perl
The form of the command that I found useful for adding the actual copyright information is below:
exiftool -p "-copyright=(c) John ..." -ext jpg -overwrite_original
The -p switch preserves the timestamp of the image file, while the -overwrite_original one ensures that you don't end up with unwanted backup files. The copyright message goes within the quotes along with the -copyright option. With a little shell scripting, you can traverse a directory structure and change the metadata for any image files contained in different sub-folders. If you wish to do more than this, there's always the user documentation to be consulted.