fix Android gallery timestamp from video image filename

If you copied the files from another phone, you will notice the new gallery will have all files to the same date of the copy operation.

Install BusyBox, and from terminal or better yet JuiceSSH onto local device, go to /sdcard/DCIM/Camera and do

for i in VID*.mp4; do busybox touch -t ${i:4:8}${i:13:4}.${i:17:2} $i; done;

for i in IMG*.jpg; do busybox touch -t ${i:4:8}${i:13:4}.${i:17:2} $i; done;

Supposing the filename is in the format

IMG_YYYYMMDD_HHMMSS.jpg VID_YYYYMMDD_HHMMSS.mp4

 

Leave a Reply

Your email address will not be published. Required fields are marked *