From 3dd0b9d3a787524e2db1fc716f96811d713aab3a Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 28 Aug 2022 11:58:34 +0200 Subject: Make dcimtimestamp operate as documented, added some comments on precision to dcimrename. --- dcimrename | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'dcimrename') diff --git a/dcimrename b/dcimrename index f04ae1e..c9ea2ce 100755 --- a/dcimrename +++ b/dcimrename @@ -17,9 +17,13 @@ while [ ! -z "$1" ]; do exiftool "-DateTimeOriginal>FileModifyDate" "${file}" # get timestamp from file + + # up to hundreths of a second #file_timestamp=`date -r "${file}" +"IMG_%Y%m%d_%H%M%S%2N"` + # up to one second file_timestamp=`date -r "${file}" +"IMG_%Y%m%d_%H%M%S"` + mv "${file}" "${file_timestamp}.jpg" fi -- cgit v1.2.3