Skip to content

Instantly share code, notes, and snippets.

@natan
Created November 27, 2014 23:37
Show Gist options
  • Save natan/d13a1be46251d26519c2 to your computer and use it in GitHub Desktop.
Save natan/d13a1be46251d26519c2 to your computer and use it in GitHub Desktop.
iOS Voicemail Backup
#!/usr/bin/ruby
# Tested on an iOS 8 iPhone backup done via iTunes
# point this to the desired backup found in ~/Library/Application Support/MobileSync/Backup/
backup_path = "/Users/nathan/Desktop/PhoneBackup/"
voicemails_path = "/Users/nathan/Desktop/Voicemail/"
Dir.foreach(backup_path) do |item|
next if item == '.' or item == '..'
path = "#{backup_path}#{item}"
file_type = `file #{path}`
if file_type.include? "Adaptive Multi-Rate Codec"
`cp #{path} #{voicemails_path}#{item}.amr`
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment