How to Find All iWork Documents Not Converted to iWork’13

iworkkeynotenumberspages

When opening documents in iWork'13, the documents are converted and may wind up looking different if they were created in iWork'09 (see Apple support article ”Working with iWork'09 files"). Documents created with even older versions of iWork can, I believe, not be opened in iWork'13 at all and must first be converted with iWork'09.

How can I find all iWork documents on a Mac which haven't been converted yet to iWork'13? Searching for all documents with a particular extension doesn't seem to be possible as iWork'09 and iWork'13 use the same file extensions.

Best Answer

I’ve put together an Automator Workflow to find all iWork documents that have not been converted yet. The workflow uses this shell script:

find "${1}" \( -iname '*.key' -or -iname '*.pages' -or -iname '*.numbers' \) -and \( -type d -or \( -type f -and -not -exec bash -c 'unzip -qq -l "${0}" Metadata/DocumentIdentifier >/dev/null' '{}' \; \) \) -and -print

Technically this script finds anything with the “key”, “pages” or “numbers” extension which doesn’t look like an iWork’13 document: documents created with iWork’13 are stored as ZIP archives and contain a “DocumentIdentifier”, whereas documents created with iWork’09 are ZIP archives without this “DocumentIdentifier”. The script also matches on directories, as the first versions of iWork stored documents as package directories.

The last action in the workflow creates an alias to the documents found by the script, making it easy to browse the results in the Finder. I recommend you change the action to use another folder than the Desktop though, as there may be a lot of results.

Edit: I have learned that the iWork document format as a ZIP archive with a “DocumentIdentifier” seems to have been introduced in iWork'14 rather than iWork'13, and is only used when saving to a Mac locally, not when saving to iCloud (as mentioned in the Ars Technica review of iWork’14). So the above script finds anything with one of the iWork extensions that does not look like a locally-saved iWork’14 document. I don’t feel a need at the moment to refine the script to only find pre-iWork’13 documents so I will leave it as it is.

Find Old iWork Documents Automator Workflow Screenshot