#!/bin/bash
# target dir is ~/Photos/YYYY-MM-DD_HOURMINUTE
targetDir="/home/$USER/Photos/$(date +"%F_%H%M")"
# create the dir
mkdir $targetDir
# cd to dir
cd $targetDir
# kill all gphoto stuff
pkill -f gphoto2
# get the files
gphoto2 --get-all-files
# delete all files on camera recursively
gphoto2 -DR