Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Can I search for files by type code?

I just tried to open a document that I created in Microsoft Word 6.0 ages ago, only to discover that Word 2016 couldn't open it. Fortunately, Word 2011, which I still have, was able to open and convert the document to a format that Word 2016 can read. Since I have many old documents that I don't want to lose access to, I'd like to be able to search for them and convert them while it's still possible.


So the question is how to search for them. Because these documents are so old, they don't have MS-DOS-style filename extensions. They are from the golden age when the resource fork of each document contained a "type code" and a separate "creator code" to identify the document type and the application that created it. For these old Word documents, the type code is W6BN and the creator code is MSWD.


The easiest solution would be to search by type code. But I can't figure out how to do this. A Spotlight search for kind:W6BN yields no results. Simply searching for all Word documents and then limiting the results by date yields way too many false positives.


Does anyone know if there is a way to search by old-school type code? Or does anyone have other suggestions?


Thanks.

MacBook Pro (13-inch Mid 2012), macOS Sierra (10.12.6)

Posted on Nov 15, 2017 1:24 PM

Reply
4 replies

Nov 15, 2017 1:33 PM in response to Daniel Holt2

Choose Utilities from the Finder's Go menu, open the Script Editor, and paste in:


tell application "Finder"

set the_files to {}

repeat with this_file in (get selection)

if file type of (info for this_file as alias) is "W6BN" then set the_files to the_files & (this_file as alias)

end repeat

the_files

end tell


Search for and select all the documents, and then run the script.


(155079)

Can I search for files by type code?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.