# file types to copy includedFiletypes = [".jpg", ".mp4"] # extensions we found, whether copied or not allExtensionsSeen = [] # exclude video thumbnails excludes = ["VIDEO.*\.jpg"] (found, copied, excluded) = copyDirToYearMonthFolder( r"E:\Backup\Devices\m8\m8PhotosExt\100MEDIA", r"E:\Pictures", "SarahsPhone", includedFiletypes, getFileDateFromContent, allExtensionsSeen, excludes, ) print() print("Total found: " + str(found)) print("Total copied: " + str(copied)) print("Total excluded: " + str(excluded)) print() print("All extensions found:", allExtensionsSeen) print("Extensions considered:", includedFiletypes) print() input("Press Enter to continue...")
# Transfers files from backup of samsung phone into E:\Pictures, working out year and month dirs from filename # from copy_utils import copyDirToYearMonthFolder from copy_utils import getFileDateFromFilename # file types to copy includedFiletypes = [".jpg", ".mp4" ] # extensions we found, whether copied or not allExtensionsSeen = [] (found, copied, excluded) = copyDirToYearMonthFolder(r"E:\Backup\Devices\MotoG\MotoGPhotosExt\Camera", r"E:\Pictures", "TomsPhone", includedFiletypes, getFileDateFromFilename, allExtensionsSeen) print() print("Total found: " + str(found)) print("Total copied: " + str(copied)) print("Total excluded: " + str(excluded)) print() print("All extensions found:", allExtensionsSeen) print("Extensions considered:", includedFiletypes) print() input("Press Enter to continue...")