Microsoft Windows has a "clever" feature which hides the extensions (or suffixes) of files. So, if you have a file named "example.gif", Windows will show you the name as "example". Unfortunately, if you also happen to have a file named "example.doc", Windows will also show its name as "example", making it look like you have two files with the same name.
In general, hiding things from users isn't a good idea. I've never understood why Windows has this feature (worse, it's on by default and the way to turn it off is buried, in the View tab of the Folder Options dialog box, so a lot of users don't even know it exists).
Here are some theories:
- Macintosh envy. On the Macintosh, filenames have types which are independent of the name. So, you can have a document named "example" rather than "example.doc". It seems friendlier to not have extensions. But, Apple did it right -- the filename actually is "example" and you can't have two files with the same name.
- Fake security. If the extension is hidden, users can't change it , which means they can't turn a TXT file into an EXE. Unfortunately, this opens a security hole. If you name a file something like "example.jpg.exe", Windows will show its name as "example.jpg", which everybody knows is a picture, not a program. It can't be dangerous, right?
Malware has exploited this Windows feature.
- Simplicity. Users are just confused by all those extensions -- let's hide them. This is like lipstick on a pig. The extensions are an essential part of the way Windows works. That's unfortunate, but true. Hiding the extensions increases complexity by introducing something that users frequently need to know but they cannot see.
It's an important enough concern that Windows has dealt with it in another place. When you rename a file in a folder window, Windows checks to make sure that you're not changing the extension. If you do, you get this warning:
How many times have you seen (and been annoyed by) this dialog? I see it all the time because I'll type a new name and forget to retype the extension. And, making matters worse, most of the time, neither Yes nor No will do what you want. Clicking Yes will continue the rename, forcing you to rename it a second time to get the extension back. Clicking No, discards whatever you just typed, which you probably want. I want the "let me type the extension now" button.
Fortunately, the basic problem can be fixed with a very simple change based on a very simple principle:
- Don't expose your schema.
The vast majority of the time (I would guess >99%) of the time, when a user renames a file, they don't want to change the extension. This makes it pretty clear that the Rename operation should only rename the base part of the filename and not the extension.
For those users who need to change an extension, an alternate option can be provided on the right click menu. And for those still using DOS commands, it should keep working the way it does -- this is about UI, not batch scripts.
Extra point. I got inspired to write this post last night when I was helping a friend over the phone. He needed to change the extension of a file but couldn't until he turned off the option (which is something I recommend everybody do). Unfortunately, he is using Microsoft Vista, which has cleverly hidden the Tools menu in folder windows. A quick Google search told me that it will magically appear if you hold down the Alt key. What were they thinking?! What else have they hidden?
- Try not to hide information from users, especially information they need to know anyway.
- Don't expose your schema.
- If you realize that you have a very common use case, optimize for it.