I think I might have posted this here before. It only works if you copy the
files from the camera memory directly to the hard drive so that the date
stamp that the camera put into the file properties is preserved.
My little script effectively reads the camera date stamp and then uses it to
rename the file, incorporating the date and time into the file name.
.raf is the extension my camera uses for raw files. Modify as you need, if it
looks useful to anybody.
#!/bin/bash
# Use the ls command to output the date and time stamp of each file
# and awk to pick out the date and time string and the filename
for datetimefilename in $(ls --time-style=+%Y%m%d%H%M%S -l *.jpg *.raf |
awk '{ print $6$7 }')
do
echo $datetimefilename
# Split off the file name so that I can use it for the rename operation
origfilename=${datetimefilename:14}
echo $origfilename
mv $origfilename t$datetimefilename
done
--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users