Skip to content

Instantly share code, notes, and snippets.

@danijeljw
Last active March 2, 2021 15:52
Show Gist options
  • Select an option

  • Save danijeljw/7676f9b14a4123aa92c8 to your computer and use it in GitHub Desktop.

Select an option

Save danijeljw/7676f9b14a4123aa92c8 to your computer and use it in GitHub Desktop.
Lightroom Image Import Prep v0.2
#!/bin/bash
# Lightroom Image Import Prep v0.2
todayDate="$(date +'%Y%m%d')"
sdCard=$"/Volumes/EOS_Digital/DCIM/100CANON/*"
newDir=$"$HOME/Desktop/$todayDate"
if [ -d "/$HOME/Desktop/$todayDate" ]; then
echo "Folder exists, manual import"
exit 0
fi
/bin/mkdir $HOME/Desktop/$todayDate
/bin/cp $sdCard $newDir
cd $newDir
for x in *_MG*.CR2
do mv $x $(echo $x | sed -e 's/_MG/_IMG/')
done
for i in *
do mv "$i" "$todayDate$i"
done
exit 0
# diskutil erasevolume HFS+ “ramdisk” `hdiutil attach -nomount ram://2097152`
$ cd /Volumes/EOS_DIGITAL/DCIM/100CANON
# if [ -d "$HOME/Desktop" ]; then
#
# fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment