|
|
|
|
| Welcome, Guest | Home | Search | Login | Register | |
| Author | Properly assigning file extensions to applications (I should know this) (Read 38217 times) | ||||||||||||||||||||||||||||||||||||||||||
|
lauland
512 MB ![]() ![]() ![]() ![]() ![]() Posts: 674 Symtes 7 Mewconer! |
on: December 27, 2024, 08:42
This is something, for some reason, that I've never quite figured out how to do consistently, in a way that ALWAYS works. I feel moderately dumb having to ask, but figure, someone here MUST know how to do this The Right Way(tm)... I may be missing something obvious, but also think things changed over the years in 6/7/8/9, and the way to do this moved around to different Control Panels, and/or depended on which you had installed (Easy Open? PC File Exchange? Claris Translator extensions? Something 3rd party? Etc.) (FYI, already tried adding a mapping in File Exchange->PC Exchange...but prob did it wrong.) What I want is the equivalent of MacOS X's "Use this application to open all documents like this one": ie if I have a file that ends in .txt, I want to open it in BBEdit (or whatever)...all files that end in .txt! I don't want to have to go changing file types and creators, or dropping the file on the app's icon (which doesn't always work anyway). I guess similar, but not QUITE the same as what I'm describing is a way to force override the creator code, and, say, always open ALL files with type TEXT in BBEdit, always, no questions asked. And, again, similar, but not QUITE the same: Why can I drag and drop a particular text file onto an application that can open it successfully, but double clicking on that same text file gives me the "The document BLAH could not be opened, because the application that created it could not be found." dialog. Ok, I KNOW I don't have the exact app, but I've got one that opens it fine...is there a way to tell the OS to go ahead and use it? Probably there are multiple answers...depending on the system version and/or extensions installed, right? |
||||||||||||||||||||||||||||||||||||||||||
Last Edit: December 27, 2024, 08:52 by lauland
|
cballero
|
1024 MB ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1176 System 7, today and forever
Reply #1 on: December 27, 2024, 12:23
|
I want to get to the bottom of this question too! It also makes me want to look this question up in a Mac Bible pub
|
ShinobiKenobi
|
256 MB ![]() ![]() ![]() ![]() ![]() Posts: 362 System 7 fan
Reply #2 on: December 30, 2024, 07:41
|
This has also bothered me for as long as I've had Macs, and is also something I have not solved, either.
|
Jatoba
|
256 MB ![]() ![]() ![]() ![]() ![]() Posts: 270 System 9 Newcomer!
Reply #3 on: December 30, 2024, 09:13
|
It's not a "solution" to this per se, but I can say I never even felt there was an issue thanks to FinderPop 1.9.2: right-click what you want to open, and select the application (for which you will have added a shortcut to in the FinderPop folder inside the System Folder). As for the actual issue, which is to OVERRIDE whatever is in the Creator and Type codes by detecting the presence of a file name extension and say "f%! it" to Creator/Type, if the OS' own buit-in mechanisms/tools for this aren't enough, we might have to hack our own Finder (or make a system Extension?) to do it to intercept the file opening call and then having the OS consult a list of programs and see which one is mapped to the extension, while completely ignoring the Creator/Type. Sounds doable? We could certainly look more into that.
|
Bolkonskij
|
Administrator 1024 MB ![]() ![]() ![]() ![]() ![]() Posts: 2023
Reply #4 on: December 30, 2024, 10:42
|
To be fair, this isn't a Mac OS issue. It's only created by the fact that the world is run on *nix machines which we use for file exchange these days. Which give a damn about Mac OS type/creator codes. Thus, the problem you describe is a fairly modern one in a sense, as it usually arises with downloaded files. It doesn't arise if you create a Word file on your System 7 Mac, emulated or not, or if you copy files over your local network. It doesn't even occur if you use services that respect type/creator files like e.g. Hotline. Which is one reason why Hotline is so great. The problem stems directly from the fact that the *nix convention of adding a suffix after a file to display its association has become the de-facto standard. So much so that people don't even question that "law of computing", it seems like the most natural thing to them. But if you dare taking a few steps back, you'll discover it ain't so. Mac OS, as you know, doesn't need any suffixes at all. (which I always loved, because suffixes always felt such an ugly solution. But then it might be a question of getting used to it ...) I know this doesn't solve your problem @lauland, yet I felt I had to put this on record for somebody else reading this with less understanding of the why and thinking it's actually a Mac OS deficiency. Which, to state again, it is not. That said, Jatoba's idea is a good solution to help bridging with the modern *nixy world. If you find going through some Type/Creator changer utility irksome, you may want to keep a handful of AppleScripts around to make the most common changes for (sit files, toast files, disk copy files etc.). So it'd only be a matter of drag & drop of a file to have it get it's association correct. Alternatively and based on your wish for an "OS X like solution" I think you'd need to write a utility that parses the file name for the three letters after the dot in the file name. It would then come up with a pre-configured list of possible applications that can handle this file. Given we don't get a dozen new applications a month for Mac OS these days, you would deal with a finite number of applications for each suffix. However, not all files on Mac OS do have a suffix as I stated above (because simply there's no need). I'd like to stress that this solution would really feel incredibly unMac-ish though :-)
Last Edit: December 30, 2024, 10:47 by Bolkonskij
|
cballero
|
1024 MB ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1176 System 7, today and forever
Reply #5 on: December 30, 2024, 17:04
|
I'm wondering where would the System Extensions and/or Control Panels to do this sort of thing might have been since the early days of Mac's foray into the DOS and Windows world. The only particular CDEV I recall also doing something of the sort, outside of the System INITs and CDEVs Lauland and others already mentioned in this thread, is PC Exchange, as Lauland also mentioned, for the Mac, but IIRC, I believe that that Control Panel specifically uses the DOS-native (I think?) three character extensions to make its filetype association. I mentioned using a Control Panel solution like PC Exchange in the event that maybe something like this could be developed? I know most of us, including 68040, would be thrilled to have such a longstanding issue that's plagued Mac file identification put to rest with a Mac resource like that, tucked away in the system folder as it does its magic
Last Edit: December 30, 2024, 17:07 by cballero
|
lauland
|
512 MB ![]() ![]() ![]() ![]() ![]() Posts: 674 Symtes 7 Mewconer!
Reply #6 on: December 30, 2024, 19:41
|
@Bolkonskij is 100% correct in all he says, even if it brings me small consolation. Looking closer at the particular problem I was having, I had a bunch of source code that originated in the non-Mac world. Dropping them on FileTyper revealed they had blank Type and Creator codes. The irritation is that I can drop them on the MPW icon and they will open, but not BBEdit or CodeWarrior. I thought this was handled by the BNDL or FREF resources, but looking at MPW in ResEdit doesn't show anything like **** (or whatever?!?). So I don't know why MPW is happy with anything, but the others not. Dropping works, but double clicking the file itself doesn't. What would (mostly) solve my problem is if I could tell MacOS 9 that if I double click on an icon with blank Type and Creator codes, go ahead and open it in BBEdit (or whatever). Obviously this is great for what I KNOW are text files, but would be less than ideal if I double clicked a binary file. (Although I actually open them in BBEdit all the time to look for strings amoung the data...so even this would be mostly safe.) Anyway, to get around this problem, I normally just drop files from "the outer world" on FileTyper and assign them Type and Creator codes (TEXT and CWIE for CodeWarrior is very typical). Otherwise, there ARE some very good control panels and/or extensions out there that do things like add a contextual right click menu to "open with..." etc, as pointed out. I don't tend to want to use them because I have quite a few macs (virtual and hardware), and re-install the System on them relatively often, so I was looking for something intrinsic to MacOS.
|
wove
|
1024 MB ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1363
Reply #7 on: December 30, 2024, 22:50
|
If you were using BBEdit OpenDoc, you could use the Editor control panel to have all text files open in BBEdit OpenDoc. Unix uses a "magic number" to open files. The magic number is the first 32bytes of the files header. The "file" command in uses this magic number for more information on usage use file's man page. About the only visible file extension needed in Unix are extensions to define file compression type (.zip .bz .gz etc.) You can see this using the Unarchiver in Mac OS X. If you change the name from file.zip to file.tar Unarchiver will tell you it is the wrong type of file. Many file types are also misleading. Libre Office files and epubs are zip files, but since you typically do not want to unzip them they will have a file extensions to route them to the program desired. None of the systems devised to map file typed to application have been able to handle all use cases. There has been work to use GUIDs and UUIDs for file mapping, but from what I can tell all it does is create another file mapping system without handling all use cases any better than what already exists. Personally I add file extensions of my own, using them as tags/labels that I can search/sort. Also the gcc compiler uses file extensions in order to sort out what the files are for. (I gather that no matter the extension most all of them are simply text files. Also of course Unix has permission so you can set the executable permission. I think part of the problem too is that folks tend to have too many applications that do the same thing. I mean if you do your text editing in simple text, why do you have another editor, and the same can be said for other applications.
|
Cashed
|
128 MB ![]() ![]() ![]() ![]() Posts: 192 System 7 Newcomer!
Reply #8 on: August 25, 2025, 02:30
|
@lauland I just noticed this thread -wasn’t around at the time of creation. I recall uploading Extension Wizard to Mac Garden. It may or may now do what you are looking for -I used it on Mac OS 9.
|
cballero
|
1024 MB ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1176 System 7, today and forever
Reply #9 on: August 25, 2025, 19:22
|
I downloaded Extensions Wizard, but it says it only works ten times before it stops working
|
Cashed
|
128 MB ![]() ![]() ![]() ![]() Posts: 192 System 7 Newcomer!
Reply #10 on: August 26, 2025, 00:11
|
IIRC you are running Mac OS 8.1 right? I Didn’t have any issues with it back then, nor yesterday on emu. If this does what @lauland is looking for, I’ll ask for a siddfix. ps: typo left in previous post, meant ‘not’ now=not 2nd ps: oh I getcha -yea demo only, will reach out if needed.
Last Edit: August 26, 2025, 00:14 by Cashed
|
|
Pages: [1]
|
| |||||||||||
|
© 2021 System7Today.com. |



