Simple shell script for downloading and organizing photos
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

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.EXT format, so the resulting file name looks something like this: 19700101-135547-3375.NEF.


  • Install ExifTool on your system. On Debian and Ubuntu, this can be done by executing the apt-get install libimage-exiftool-perl command as root.
  • Make the script executable using the chmod +x command.
  • 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/NIKON\ D90/DCIM/100NCD90/)
    • model_prefix (e.g., SONY_NEX-3N, NIKON_D90)


Insert the card with photos and run the ./ config.cfg command. That's all there is to it.