- 1 year ago
Batch copy metadata from one file to another (EXIFTOOL)
To copy metadata from one file to another using ExifTool in a batch script, you can use the following command:
batchexiftool -TagsFromFile SOURCE_FILE DESTINATION_FILE
Replace SOURCE_FILE
with the file from which you want to copy the metadata, and DESTINATION_FILE
with the file to which you want to copy the metadata.
Here's an example batch script that copies metadata from multiple source files to their corresponding destination files:
batch@echo off
setlocal enabledelayedexpansion
set "source_dir=C:\path\to\source\directory"
set "dest_dir=C:\path\to\destination\directory"
for %%F in ("%source_dir%\*.jpg") do (
set "source_file=%%F"
set "destination_file=!dest_dir!\%%~nxF"
exiftool -TagsFromFile "!source_file!" "!destination_file!"
)
echo Metadata copied successfully!
Make sure to replace source_dir
and dest_dir
with the appropriate paths to your source and destination directories. This script will copy metadata from all JPEG files in the source directory to their corresponding files in the destination directory.
Save the batch script with a .bat
extension, and then double-click to execute it. It will use ExifTool to copy the metadata from the source files to the destination files.