Last active
September 6, 2015 00:46
-
-
Save hermanbanken/e095aca2bd29c5b6f527 to your computer and use it in GitHub Desktop.
iPhone photos extract script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Extract all photos from your unencrypted backup. Includes Whatsapp photo's and videos. | |
dir="name-of-backup-folder" | |
(IFS=' | |
' | |
for file in `ls $dir`; do | |
out=$(cd $dir;file --mime-type $file); | |
if [[ $out == *"image/"* ]]; then | |
ext=`sed -e 's/.*image\/\(.*\)$/\1/g`; | |
cp "$dir"/"$file" "extract-tmp/"$file.$ext; | |
fi | |
done) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment