Microsoft offers scant documentation and tools for working with file types in Windows XP, presumably to protect the sensibilities of the novice user. Ironically, however, this just creates a whole new set of problems for beginners, and more hassles for experienced users. This sample book chapter remedies that situation. You’ll learn the basics of file types, and then see a number of powerful techniques for using file types to take charge of the Windows XP file system.
useless!
I always wondered about the internals of the Windows file association dialogs – now I know
“Microsoft offers scant documentation and tools for working with file types in Windows XP”
This news article is on the same page as another article with the quote: “David Chisnall argues that it’s time to retire UNIX in favor of modern systems with a lot more horsepower”
How amusing, and this can’t be by coincidence, either. Say it with me:
MAN PAGES
conviced closed source monopolies can afford to fund anti-FOSS propoganda. f–k Microsoft
<your troll here>
Amiga OS 4 (yes, still in beta), like its predecessors, handles this issue with “datatypes”.
Check out the new OS 4 web site for more information:
http://os4.hyperion-entertainment.biz/index.php?option=content&task…
A good read if you want to know more about file types.
%SystemRoot%system32NOTEPAD.EXE %1
NOTE
The %1 at the end of the command is a placeholder that refers to the document being opened (if any). If you double-click a file named memo.txt, for example, the %1 placeholder is replaced by memo.txt, which tells Windows to run Notepad and open that file.
%1 is a parameter not a placeholder. The parameters are the information sent to the program being executed. %0 is the first and is the name of the program. %1 is the first option on the command line, for example %1=hello.txt
>notepad hello.txt
%2 is the second for example %2=world.txt
>notepad hello.txt world.txt
When you type any command into a command line the parameters are arranged as follows
%0 %1 %2 %3 %4 … %n
Only the first is required.
when you open a file such as hello.txt in the windows shell, it looks up what program opens that file type then at that registry setting. It then converts all the files you opened (at one time) into the different parameters %1 – %n. If you only open one file for notepad then it passes only one parameter, so if you open more than one what happens to the rest? The system then opens up more instances of notepad and gives them each file in order as the first parameter. Which is why when you open multiple text files it opens them in different windows.
Some applications however can take multiple parameters.
If you open up the command prompt in Windows and run word with two files it will open them both. If you try it with notepad it won’t work because word accepts more than one parameter for opening files notepad doesn’t, notepad concatenates everything from parameter %1 to %n into a single filename.
Placeholder might sound like a useful word for people who are just learning but later on when they find out that they are parameters they will get confused.
google batch file parameters
The original post (quoted below) seems to have been nazified to -5 moderation. Windows fanboys will not stop the truth from getting out.
“”Microsoft offers scant documentation and tools for working with file types in Windows XP”
This news article is on the same page as another article with the quote: “David Chisnall argues that it’s time to retire UNIX in favor of modern systems with a lot more horsepower”
How amusing, and this can’t be by coincidence, either. Say it with me:
MAN PAGES
conviced closed source monopolies can afford to fund anti-FOSS propoganda. f–k Microsoft”
Yet another exmaple of microsoft treating it’s users like 3yr old children, to the pain and headaches of helpdesk workers everywhere.
Most human beings dislike learning something new.
So the only way to get them to learn it is to force them to.
Most people are prefectly willing to learn something if it’s the only way they will be able to use a product they need to use.
If you baby them, they will not take the one hour it takes to learn important things that will save them a lot of time in the future.
– Jesse McNelis
The file type system is the single most barfed up part of Windows.
There’s no way to change the type of a file for a normal user; there’s no way to open a file with a different program. At least up to Win2000, the easiest way to control the file types is by manually editing the registry.
Removing a program barfs up all its file associations.
HKEY_CLASSES_ROOT is not the only position to register file types; there’s at least an Explorer key somewhere in HKCU and HKLM, which additionally has a different syntax for the registrations, and sometimes supersedes the ones registered in HKCR.
Even though it has been possible to use meaningful extensions since ’95, people continue to use the botched three-letter ones, which results in everybody using the same f–king extension over and over. And since it’s not possible to define the preferred program on a by-file basis, well, you know the rest. I mean, how hard would it be to use .myCompanyNameGenericDataFile instead of .DAT? Now, you could argue that 26^3 possible combinations should be enough for all file formats; but they don’t use random combinations; they use .DAT over and over.
Then there’s companies like Apple, who actually _deprecated_ their working, superior system (with centrally registered type and creator codes), and _replaced_ it with, no, not with something that worked (like MIME types), but with the same f–king three-letter extension system. At least they didn’t copy the registry in the process.
To conclude, I hate every single part of the Windows file type system, and I cannot for the life of me imagine how anyone could ever have thought it to be a good idea.
</rant>
Then there’s companies like Apple, who actually _deprecated_ their working, superior system (with centrally registered type and creator codes), and _replaced_ it with, no, not with something that worked (like MIME types), but with the same f–king three-letter extension system.
Yes, that is stupid. The file type should certainly be kept separate from the file name, and having separate type and creator codes is a good idea too. But really those 4-letter codes aren’t that much better than the DOS extensions.
That’s why Apple has introduced a new system called Unique Type Identifiers. It uses a hierarchy of types (much like an object-oriented class hierarchy) and it isn’t limited to two levels like type/creator or MIME.
More here:
http://arstechnica.com/reviews/os/macosx-10.4.ars/11
Now they just need to get developers to actually use the system. And ideally it should become an Internet standard.
there’s no way to open a file with a different program.
How about: right click on a file icon > open with…
The problem with filename extensions as file types specifiers is that they are not extensions at all – they are clearly a part of the filename and as such limits the choice (you have to pay attention how you are naming your files). The same goes for prefixes like dot-files. Personally I like the BeOS concept best. Ok, MIME types could be replaced with something even better, but it’s ok kind of practical, actually. However, the really clever thing is that fall-back to registered filename extension lookup for all those non-BFS filesystem that use extensions (it fakes the TYPE attribute for you, transparently), it actually works quite well.
“One of the fictions that Microsoft has tried to foist on the computer-using public is that we live in a “document-centric” world. That is, that people care only about the documents they create and not about the applications they use to create those documents. This is pure hokum.”
Ehr…isn’t it quite the opposite? BeOS users are justifiably proud that their OS is data-centric as opposed to application-centric like Windows (Mac OS was a much worse offender though). Windows centres on the concept of proprietary document formats, and thus applications, through it’s retarded extension handling (why, for example, is it that from Win95 through W2k3 .1st files are still not standardly handled by any text editor/viewer bundled with Windows?).
having the network being aware of the filetype is my idea of filesystem utopia. until that is neing realized, the 3 or 4-letter extension is a good application for a least common denominator to determine filetype. and in also in my utopia, the filesystem autodetects the filetype, independant of it’s filename. extend it a little more and it should fill out meta data about the file and understand the semantics in it. the problem with meta data is that it’s hard to preserve across multiple systems, since it needs all parties to agree on one standard.
in the meantime, i don’t find any hassles in using ntfs, nor befs,nfs,ufs,reiserfs etc, in my everyday life.
—
garapheane
this it´s a yoke, realy?
Er, none of this is really new, is it? Windows XP basically handles filetypes the same way that Win95 on up has handled them. In short, Microsoft has never really solved the problem, but rather, they’ve just tried to hide it.
FAT or NTFS?
Neither is a true file system.
See below for a real file system…
http://www.namesys.com/