Change a resource fork in OS X with the terminal [solved] [partially]
So one of my problems with macs has always been that you don’t have enough control over file types – programs and the OS try to outsmart you and only open what they think they can open, and no amount of fiddling or dragging and dropping would get them to open their own file if they were wrong about what type of file they thought they were.
OS X has gotten slightly better in taking the PC convention of file extensions – OS X asks if you’re sure if you want to change the extension and the icon often changes as well as the default program that opens the file when you change it.
But what about files that don’t have any extension by default, such as digital performer files? I recently had a digital performer project emailed to me with its resource fork stripped so I couldn’t open it. OS X thought it was a plain text file when I got info on it.
There have been applications since at least OS 8 that would let you modify resource forks and hex edit files such as resedit and resknife.
Now that OS X is unix though, there are some handy terminal commands to manage resource forks:
GetFileInfo [name of file]
will tell you the resource information about a file. I did this on an existing DP file and it said:
type: “PERF”
creator: “MOUP”
Then I was able to use: SetFile -c MOUP -t PERF [name of file]
to convert the plain text file back to DP again. Sweet!
Here’s a tip: If you run this command:
ls [name of file]/rsrc
and you get “No such file or directory”, the file does not have a resource fork. If you get a listing, it does have one.
Source: Mac OS X Command Line Tools Tips
-edit-
Ok I’m still having problems – DP says “An error occurred while reading from the disk. The file [name of file] was not loaded. ID = 102″.
0 comments Tuesday 22 Jan 2008 | jordan314 | Computers, OS X, leopard, solved
Leave a Reply
You must be logged in to post a comment.