In a recent project, I faced a situation where over 1,000 images were edited and exported to JPG. However, because the “save all metadata” setting was missed during export, all output files lost the metadata from the original RAW files (NEF).

With & Without metadata

With & Without metadata

As a result, the photographer was unable to import the images into their system, as critical metadata, such as shooting date, camera settings, and lens information, was missing. With only 23 hours left before the deadline, re-exporting everything was nearly impossible.


Initial Options Considered

  1. Re-edit and re-export all images from scratch – an extremely time-consuming process, not feasible within the deadline.
  2. Use tools for manual metadata import – some tools could import full metadata, but only one image at a time in the free version.
  3. Batch tools – capable of bulk operations, but metadata was incomplete.

The Solution: ExifTool

ExifTool is a powerful open-source command-line application for reading and writing metadata in image and video files (NEF, JPG, PNG, MP4, and many others).

Key advantages:

  • Works seamlessly on Windows, macOS, and Linux.
  • Free, lightweight, and handles batch processing.
  • Copies complete metadata without affecting image quality.

Step-by-Step Workflow

1. Prepare folders and filenames

  • Place RAW files (NEF) and edited JPG files in separate folders.
Folder structure

Folder structure

  • Ensure filenames match (e.g., DSC_0001.NEF ↔ DSC_0001.JPG). 👉 Batch rename with Total Commander (Ctrl+M) if needed.

2. Install ExifTool

  • Download from https://exiftool.org/
  • Windows: place exiftool(-k).exe in the working folder or add to PATH.
  • macOS/Linux: install via brew install exiftool or your package manager.

3. Batch script for Windows

Create a .bat file (example for folder Pack_0:

@echo off
setlocal enabledelayedexpansion

set RAW_DIR=C:\Users\Admin\Downloads\Pack_0809\Source
set JPG_DIR=C:\Users\Admin\Downloads\Pack_0809\Output_final\Pack_0

for %%f in ("%JPG_DIR%\*.jpg") do (
    set filename=%%~nf
    echo Copying metadata for: !filename!.jpg
    exiftool -tagsFromFile "%RAW_DIR%\!filename!.NEF" -overwrite_original "%JPG_DIR%\!filename!.jpg"
)

echo Metadata copy completed!
pause

4. Equivalent script for macOS/Linux

Save as a .sh file and run via terminal:

#!/bin/bash

RAW_DIR="/Users/admin/Downloads/Pack_0809/Source"
JPG_DIR="/Users/admin/Downloads/Pack_0809/Output_final/Pack_0"

for jpg in "$JPG_DIR"/*.jpg; do
  base=$(basename "$jpg" .jpg)
  echo "Copying metadata for: $base.jpg"
  exiftool -tagsFromFile "$RAW_DIR/$base.NEF" -overwrite_original "$jpg"
done

echo "Metadata copy completed!"


Verifying the Results

  • Open the JPG files in Adobe Lightroom or Adobe Bridge to confirm metadata has been successfully restored.

Outcome

  • Setup time: ~10 minutes.
  • Processing time: ~3 minutes for over 1,000 JPG files.
  • Result: Full metadata restored, allowing the photographer to immediately import and manage the images.

Key Takeaways

  • Always double-check export settings to preserve metadata.
  • ExifTool is a lifesaver when dealing with bulk files under tight deadlines.
  • Add this workflow to your internal knowledge base so your team can act fast in future incidents.

For anyone handling large volumes of images, ExifTool is an essential tool in your toolkit.

Contact Us to explore how LRetouch can enhance your real estate marketing efforts.