Fotobasher is a simple shell script that transfers photos from a mounted storage device (e.g., SD card), organizes the photos into folders by date, and then renames each photo using the data pulled from the photo's metadata. Photos are renamed using the YYYYMMDD-HHMMSS-ShutterCount.EXT format, so the resulting file name looks something like this: 19700101-135547-3375.NEF. s
- Install ExifTool on your system. On Debian and Ubuntu, this can be done by executing the
apt-get install libimage-exiftool-perlcommand as root.
- Put the ExifTool_config file into the home directory, then rename the file to .ExifTool_config .
- Make the script executable using the
chmod +x fotobasher.shcommand.
- Open the config.cfg file in a text editor and specify the correct values for the available parameters
- source_dir the path to the directory on the storage device containing photos (e.g., /media/EOS_DIGITAL/DCIM/100CANON/)
- model_prefix (e.g., CANON1100D, NIKOND90)
- ext file extension of the source photos (e.g., NEF, CR2, JPG)
Insert the card with photos and run the
./fotobasher.sh config.cfg command. That's all there is to it.
: Adding the .ExifTool_config file is required only if you want to include the shutter count value in the file names. In case you use an alternative renaming rule, you can skip this step.