Created
June 25, 2019 15:20
-
-
Save bgulla/b217ab682ae5d0bc35c73838c0c28105 to your computer and use it in GitHub Desktop.
Dumps all images from iMessages.
This file contains hidden or 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
import os | |
import shutil | |
mkdir ~/Desktop/imessage | |
rootDir = "/Users/${USER}/Library/Messages/Attachments" | |
destDir = "/Users/${USER}/Desktop/imessage" | |
IGNORE_STRING = "pluginPayloadAttachment" | |
for dirName, subdirList, fileList in os.walk(rootDir): | |
#print("Found directory: %s" % dirName) | |
for fname in fileList: | |
if IGNORE_STRING in fname: | |
print("skipping: \t%s" % fname) | |
continue | |
print("\t%s" % fname) | |
src_fp = os.path.join(rootDir, dirName,fname) | |
dest_fp = os.path.join(destDir, fname) | |
shutil.copy2(src_fp, dest_fp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment