Old files are now Unix Executable

This was last discussed 13 years ago with no resolution I can find. It must be related to O/S update some time back. Is there a fix?

MacBook Pro 15", OS X 10.11

Posted on Mar 19, 2020 12:45 PM

Reply
Question marked as Top-ranking reply

Posted on Mar 19, 2020 1:14 PM

Files from OS 9 and earlier (in particular) were tracked by the Type and Creator codes in their resource fork data so the OS would know, more than anything else, what app it belonged to.


These were deprecated all the way back in Snow Leopard. macOS stopped paying attention to them entirely starting a few versions back and now uses a combination of file extensions and Uniform Type Identifiers. What you're looking at is the OS' way of saying, "I have no idea what this is."


If you know what app they're from, you can add the appropriate file extension. For Microsoft Word, it would be .doc .


The real problem is finding any app that will show you those codes. File Buddy is one, but I'm not sure if it has a demo mode. If you can use it (at least for a few days), this is what you want to find out. In this example, I did a Get Info on an old PDF file.



Type and Creator codes always have four characters each. CARO indicates Adobe Acrobat created the file. Type is PDF(space).


This is what you want to know on all of these old files in order to help figure out what they are. Such as, any file with a creator of 8*** is Photoshop. ART5 is Illustrator.

20 replies
Question marked as Top-ranking reply

Mar 19, 2020 1:14 PM in response to Rubber

Files from OS 9 and earlier (in particular) were tracked by the Type and Creator codes in their resource fork data so the OS would know, more than anything else, what app it belonged to.


These were deprecated all the way back in Snow Leopard. macOS stopped paying attention to them entirely starting a few versions back and now uses a combination of file extensions and Uniform Type Identifiers. What you're looking at is the OS' way of saying, "I have no idea what this is."


If you know what app they're from, you can add the appropriate file extension. For Microsoft Word, it would be .doc .


The real problem is finding any app that will show you those codes. File Buddy is one, but I'm not sure if it has a demo mode. If you can use it (at least for a few days), this is what you want to find out. In this example, I did a Get Info on an old PDF file.



Type and Creator codes always have four characters each. CARO indicates Adobe Acrobat created the file. Type is PDF(space).


This is what you want to know on all of these old files in order to help figure out what they are. Such as, any file with a creator of 8*** is Photoshop. ART5 is Illustrator.

Mar 20, 2020 1:06 PM in response to Kurt Lang

Oh, man! That's useless. Just had a chance to test it today and MuchoFileInfo is strictly an OS 9 Classic app.


So, here's one that's free and works in Mojave or earlier.


https://www.everydaysoftware.net/quickchange/


It's an unsigned app, so you need to right click on it and choose Open to get it to launch. After that, just drag and drop your Exec files on it to see if they have Type and Creator codes. Here's the result of me dropping an ancient Photoshop TIFF on it:


Mar 20, 2020 1:31 PM in response to Kurt Lang

Kurt,


Would you try this on that old Photoshop TIFF file? It will prompt you for the image, and display creator and type codes if it can plumb them from the file. Copy/paste into Script Editor, and click the document icon in the Script Editor bottom margin so you can see the document attributes in the bottom panel.


use framework "Foundation"
use AppleScript version "2.4"
use scripting additions

property NSFileManager : a reference to current application's NSFileManager
property NSString : a reference to current application's NSString

set infile to POSIX path of (choose file default location (path to desktop))

set fm to NSFileManager's defaultManager()
set arec to fm's attributesOfItemAtPath:infile |error|:0
log (arec) as record

set fname_ext to (NSString's stringWithString:infile)'s lastPathComponent()

set creator_code to arec's valueForKey:"NSFileHFSCreatorCode"
set type_code to arec's valueForKey:"NSFileHFSTypeCode"

if not class of creator_code is "text" then set creator_code to "n/a"
if not class of type_code is "text" then set type_code to "n/a"

display dialog "Creator: " & creator_code & return & "Type:      " & type_code with title "File: " & fname_ext
return


Mar 19, 2020 3:01 PM in response to Rubber

Yeah, I wasn't sure if you could use that. I've had a registered version for a long time and couldn't remember if it had a demo period.


You used to be able to find Type/Creator viewers and editors rather easily, but most of them only worked in OS 9 and earlier. The only one I have that would work in El Capitan is the free Mucho File Info. But I can't find that one anywhere on the web.


Edit: Found it!


https://muchosoft.com/products/muchofileinfo/

Mar 21, 2020 10:43 AM in response to Rubber

You're welcome. 🙂


I'd be interested in knowing if any of these files still retained their Type/Creator codes. You can copy/paste the code just above your last post into the Script Editor found in the /Applications/Utilities/ folder. Just paste and click the run button (arrow). Select a file and see what it returns.


For either without a code, it will say "missing value". Otherwise, a Word document should have a Creator code of MSWD, and a Type code of W8BN.

Mar 20, 2020 3:59 PM in response to Kurt Lang

Yeah, that's where I started, but I have so few classic Mac OS original files now that testing is frustrating. Here is another variation:


set infile to POSIX path of (choose file default location (path to desktop))

set creator_code to "n/a"
set type_code to "n/a"
set codes to {} as list

tell application "Finder" to set fname_ext to (POSIX file infile as alias)'s name
try
	set codes to words of (do shell script "mdls -raw -name kMDItemFSCreatorCode -name kMDItemFSTypeCode " & infile & " | xargs -0 -n 2") as list
end try

if (count of codes) > 0 then
	if not (item 1 of codes) = "" then set creator_code to (item 1 of codes)
	if not (item 2 of codes) = "" then set type_code to (rest of codes)
end if

display dialog "Creator: " & creator_code & return & "Type:      " & type_code with title "File: " & fname_ext
return


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Old files are now Unix Executable

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