Rename AVCHD files using Exiftools

Simple bash script to rename AVCHD/MTS/MOV files to match their recording date and time.
<br /> #!/bin/bash<br /> if [ -z "$1" ]; then<br /> echo "Usage: ./rename_video.sh FILETYPE" 1>&2<br /> echo "Example: ./rename_video.sh *.MTS" 1>&2<br /> exit 1<br /> fi<br /> for x in "$@"<br /> do<br /> exiftool '-FileName<DateTimeOriginal' -d %Y%m%d_%H%M_%%f.%%e "$x"<br /> done
The resulting files will be named like YYYYMMDD_HHMM_BASENAME.ext ie 20120703_1635_05600.MTS

Exiftools can also be used to perform the renaming process in Windows as well using a command window
`

exiftool "-FileName<DateTimeOriginal" -d %Y%m%d_%H%M_%%f.%%e *.MTS`

This script has been tested on Canon Legria and on Panasonic HDC-SD800 video camera MTS-files and Nikon D7000 MOV-files with great success.