ライナックスで写真の名前変化

In our digital era, everyone possesses at least one device that allows to take pictures. This can be a dedicated digital camera, a cellphone or maybe a tablet. Most of these devices embed extra data in the picture your can use at your advantage.
There are plenty of software you can use to manage your pictures but it's stronger than myself and I need to manage this manually. I have defined quite precise rules in order to tidy my pictures and one of the criteria I use is the filename for which I decided a precise format.
If it is on Windows I would simply use some piece of software such as ReNamer for which I wrote some rules and a script but under Linux I didn't found such an interesting and simple software. So what I did is to replace this with a script.
Let's get into the details. The format I chose is Photo-YYYY-MM-DD. Getting back to what I told in the beginning : Most devices add extra data. This data is called EXIF (Exchangeable Image File) and contains various information about the picture such as the camera settings, geolocalization, date and time. This is the source for my date information because it is much reliable than the filesystem date which is updated for instance when you move the picture. So this is important to me that the devices I use have their date and time set up properly. As a matter of interest I have pictures of my godchild which EXIF (and filesystem) date goes back to 2004 but she was born in 2007. The persons who took the pictures simply didn't set up the date and time properly.
Below is the script I wrote based on exiftools and following my own preferences. You may need to edit this if you wish to.


Have a nice day !