🤖🚫 AI-free content. This post is 100% written by a human, as is everything on my blog. Enjoy!

How to automatically sync photos from your Windows Phone 7 to Mac OS X

June 18, 2012 in Software

It is notoriosly hard to download photos and videos shot with a Windows Phone: it’s not mountable as a USB drive, and the only way to access the phone is through the Windows Phone 7 Connector; and even the connector only allows you to sync the photos into iPhoto or Aperture. If you’re not using Apple image management tools, you’re out of luck.

It can also copy the files into a folder by drag-and-dropping them from the Connector to a Finder window. Not only the operation is manual and mouse-operated, but the copy operation does not handle duplicates at all, and if the files are present in the target location, it creates more copies of them. So you’re going to have to manually select all new, non-downloaded photos.

I tried this once and did not like it at all.


So I went and automated the whole process (open connector, drag-and-drop photos to a folder, deduplicate) as an AppleScript.

The AppleScript is packaged as an app, go download it here: WindowsPhoneSync.app. You’ll still need the Windows Phone 7 Connector from Microsoft.

Then just launch the app and it will sync your phone’s contents with a folder on your hard drive. Done!

Post mortem

The Connector app makes no effort to be a good OSX citizen; it is not scriptable, and the “browse files” file list is presented as a dumb table. The only way of getting those files into a folder is drag-and-drop; not even copy-paste is supported.

So scripting the whole process was an adventure. I had to arrange the Connector and a Finder window on screen, and then use a little Python utility to simulate drag-and-drop. Then I wait for the “Cancel” button to disappear from the GUI (which means the operation is complete).

Also, I couldn’t simulate clicking on the “Browse Device” button in the Connector, and it was sheer luck that I found out you can get to the screen by pressing arrow-down a couple of times.

To avoid making duplicates, I drop the files into a temporary folder (unfortunately, I can’t determine which files are new without copying all of them), and then use the trusty rsync tool to copy new files to the target folder.

Buy me a coffee Liked the post? Treat me to a coffee