itunes - iTunes Manual Backup - Wifi Sync Multiple Devices

Hey All,


  • manually initiate backup of devices from iTunes through applescript.


  • I can start the backup process for one but the subsequent devices fail.


  • itunes 12, macOS 10.14
  • wifi sync enabled
  • the UI does have an interface
    – File > Devices > Backup (but you have to select each device for it to be enabled)
    – Second Mouse click on device and select backup on each device is also available but not useable if UI isn’t accessible


  • Is there a way to achieve the backup through AppleScript on multiple devices?
  • also is there another command that does a backup instead of sync. Since update seems to do a sync.

This is what i have working but the second device shows an error.

set devices to {"deviceName1", "deviceName2"}
repeat with theDevice in devices
	tell application "iTunes"
			update theDevice
		on error
			say "Backup error on" & theDevice
		end try
	end tell
	delay 20
end repeat