Announcement: Upgrade to macOS Mojave

With features like Dark Mode, Stacks, and four new built-in apps, macOS Mojave helps you get more out of every click. 
Find out how to upgrade to macOS Mojave > https://support.apple.com/macos/mojave

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

Question:

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

Reply
Question marked as Solved
Answer:
Answer:

It turns out that I was going about this the hard way. All I needed to do was type "kind:word 6.0" into the search box, hit return, and there they are.

Posted on

Page content loaded

Nov 15, 2017 1:33 PM in response to Daniel Holt2 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)

Nov 15, 2017 1:33 PM

Reply Helpful
User profile for user: Daniel Holt2

Question: Can I search for files by type code?