This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# first argument: the main part of the new name | |
# following arguments: the *.ARW files you want to rename | |
# | |
# example: | |
# $ rename-ARW-and-xmp-with-date "new name" DSC02*.ARW | |
name=$1 | |
shift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
name=$1 | |
shift | |
for i | |
do | |
file="$i" | |
date=$(exiv2 -g Exif.Photo.DateTimeOriginal pr "$file" | cut -c61-79) | |
date=${date:0:4}-${date:5:2}-${date:8:2}--${date:11:2}.${date:14:2}.${date:17:2} | |
echo mv "$file" "$name $date".ARW | |
mv "$file" "$name $date".ARW |