Renaming files by date and model
Posted: 05 Aug 2014, 21:33
Ok so I got a whole load of photos back from photorec - as usual it was the best tool for the job.
Now, I've used the following code to rename by any available timestamp in the exif information:
and then I've also tried to prepend that with the model number:
Doing this will prepend the file with say "iphone-2014...jpg" but can it be clearer on the model, i.e. some are iPhone 4 and some are iPhone 5 - how can I get it to give the full model description.
Also - is there a way to Append the info as opposed to prepend it and also skip over any errors?
Thanks
Now, I've used the following code to rename by any available timestamp in the exif information:
Code: Select all
for i in ./*.jpg; do cp $i ../final/`exiv2 -p s $i | grep timestamp | awk '{ print $4 "-" $5 }'`.jpg; done
Code: Select all
for i in *.jpg; do mv $i `exiv2 -p s $i | grep model | awk '{ print $4 }'`-$i; done
Also - is there a way to Append the info as opposed to prepend it and also skip over any errors?
Thanks