Skip to content

A node.js hack to change the modified time of files based on EXIF data (for pictures) or the filename (for movies or files lacking EXIF data)

License

Notifications You must be signed in to change notification settings

tudorminator/timestamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

timestamp

A node.js hack to change the modified time of files based on EXIF data (for pictures) or the filename (for movies or files lacking EXIF data)

Uses the great ExifTool by Phil Harvey if installed and available in the current path, otherwise tries a very crude parsing of the filename.

Requirements

  • Node.js obviously
  • Chalk for color output: $ npm install chalk
  • GNU core utilities on macOS, because Apples's BSD ones have different command line switches and I just can't be bothered. Install them through Homebrew or MacPorts: $ brew install coreutils

Usage

timestamp.js [-q|--quick] "/path/to/some/directory"

Updates the modification times of image or video files in the specified directory using the capture times from their EXIF data.

If no EXIF data is found or if you specify the -q (--quick) option, it tries to parse the file's name for information looking for text that resembles the format YYYY-MM-DD HH:mm:ss. The parsing is not very smart or foolproof (see line 34 in timestamp.mjs for the used regular expression).

Supported files: jp(e)g, png, gif, mp4, m4v, mov, avi.

About

A node.js hack to change the modified time of files based on EXIF data (for pictures) or the filename (for movies or files lacking EXIF data)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published