Picture rename
From Elch-Wiki
Jump to navigationJump to search
Problem
Gewisse Digi-Cams numerieren die Bilder einfach fortlaufend, statt den Filenamen aus dem Aufnahmedatum zu bilden
Lösung 1
exiftool -d '%Y%m%d_%H%M%S%%-03.c.%%e' '-filename<CreateDate' .
Lösung 2
picrename.sh
im Home
Script
#!/usr/bin/bash for file in *JPG do # Uncomment if the file-create/-modify date should be modified to change e.g. timezones! # touch -d "$( date -d @$(( $(stat -c '%Y' $file) - 12*60*60 )) )" $file # Take the file-create/-modify date as the new filename newfile=$(date +"%Y%m%d_%H%M%S_$file" -d "$(stat -c "%y" $file)") # Rename mv "$file" "$newfile" done
Move all files of a group of subdirs to one dir
$ mv ~/miracles-happen/recup_dir.*/*.jpg ~/miracle-happens/images/