Skip to content

Rename photos according to the timestamp in the exif metadata.

License

Notifications You must be signed in to change notification settings

jdinkla/rename-images-by-exif-timestamp

Repository files navigation

Rename images according to EXIF timestamp

Some older cameras used cryptic filenames like "DSCN1893.JPG" as filenames and when sorting photos you have no idea in what folder to put this file.

Luckily the timestamp of the creation is often available as exif metadata in the file itself. Here is an excerpt of this data showing the CreateDate timestmap.

...
 exif: {
    ExposureTime: 0.00625,
    FNumber: 3,
    ExposureProgram: 2,
    ISO: 50,
    ExifVersion: '<Buffer 30 32 32 30>',
    DateTimeOriginal: '2006:06:04 10:21:12',
    CreateDate: '2006:06:04 10:21:12',
...    

This file would be renamed into '2006-06-04 10.21.12.jpg'.

But renaming files by hand is tedious, so I wrote a utility for it.

Prerequisites

Node is required. See the installation instructions.

Installation

$ git clone https://github.com/jdinkla/rename-images-by-exif-timestamp.git
$ cd rename-images-by-exif-timestamp
$ npm ci

Usage

$ npm run single FILENAME.JPG
$ npm run folder /path/to/folder

The execution may take a while, especially on old hard drives. So please be patient and wait until the process has stopped by itself.

About

Rename photos according to the timestamp in the exif metadata.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published