summaryrefslogtreecommitdiff
path: root/dcimrename
diff options
context:
space:
mode:
authorStijn Buys <ingar@telenet.be>2022-08-28 11:58:34 +0200
committerStijn Buys <ingar@telenet.be>2022-08-28 11:58:34 +0200
commit3dd0b9d3a787524e2db1fc716f96811d713aab3a (patch)
tree307f33883910d74348aeda49fc3bf83e8b101c91 /dcimrename
parent7329ffa21452841d5c5ef56d4f9ba150417f6f50 (diff)
Make dcimtimestamp operate as documented, added some comments on precision to dcimrename.HEADmaster
Diffstat (limited to 'dcimrename')
-rwxr-xr-xdcimrename4
1 files changed, 4 insertions, 0 deletions
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