Open files by filetype

From TotalcmdWiki
Jump to: navigation, search

Associations hell - the Windows association system

The Windows associations system which allows users to open an associated application by doubleclicking on a file has some very ugly disadvantages.

  • Associations are stored in the Windows registry database. That means it absolutely not feasible to use it with applications on a USB stick.
  • Associations are stored in many different ways. There is not just one way to create associations. There are so many even Microsoft doesn't know them all. There is no proper documentation. It's very difficult to support them all and every Windows version introduces new ways to create associations.
  • There is a battle for associations between applications. Every applications wants to be opened when the user clicks on a supported file. For this reason many applications reregisters the association as often as possible. The user is lost in always changing associations.
  • It's not easy to manage. An Windows association is an assignment between a single application and only a single file extension.

Solution - Internal association system in Total Commander using custom filetypes

Total Commander already has a system which allows users to create simple but also very complex custom filetypes. They can be used in many places in Total Commander - for example in "define colors by filetype". Open files by filetype would work in the same way. Instead of coloring the file as in "define colors by filetype" the user could choose one or more applications and an icon and assign it to a custom filetype. The application stored in the first matching association would be executed. An alternative command could show a list of applications if the user has defined more than one. It's quite simple especially because the well-known custom filetypes are reused. In addtion it's much easier to manage those new associations as you can use for example a custom filetype >Videos to associate a bunch of extensions (*.avi;*.mov;*.mp4 and so on) to one application. Open files by filetype would solve all problems which currently exist with the Windows association system. Open files by filetype would also allow file-specific associations.

Some options could be useful

  • An option to enable displaying a thumbnail of the file as icon. The existing Lister function can be reused or a new very similiar function which is optimized for very small preview pictures could be added.
  • An option to open the Windows association if no custom association matches the file to open. As long as this option is enabled the behavior would be identical to the current. Newly created custom associations would just overrule the Windows associations.