Why can't you rename the Recycle Bin?

Raymond Chen

Commenter zd asks, “Why can’t you rename the Recycle Bin?” This question, as do many questions, comes with implicit assumptions. In particular, the assumption that everything can be renamed by default and that somebody must have gone to the effort of blocking the rename of the Recycle Bin. Actually, reality is the reverse. Shell namespace objects cannot be renamed by default. Code has to be written to support rename. This is a special case of something Ry Jones saved, namely, that features start out nonexistent and somebody has to make them happen. To support renaming, the shell folder needs to support IShellFolder::SetNameOf and then needs to find a place to save that new name so that the next time somebody calls IShellFolder::GetDisplayNameOf, the name you set is returned instead of the original name. Other technical points are making sure that shortcuts that were created to the object before the rename still work after the rename, and that you didn’t break any code that tried to access the object by its old name. That last bit is scary, because third-party programs have a habit of hard-coding all sorts of stuff. (I can imagine there’s some program that looks for an object called “Recycle Bin” and crashes if it can’t find it.)

Besides, you can’t rename Control Panel icons either.

0 comments

Discussion is closed.

Feedback usabilla icon