What I do not understand is in what cases the value in Python. File is used. However I recall reading in the past that associates made from within Explorer always overwrite those from Classes registry key. They were not separate or different hives. However, this changed for Win XP and is no longer true. This two step system facilitates not only one-to-one but many-to-one and one-to-many file association schemes.
|Published (Last):||20 March 2018|
|PDF File Size:||16.30 Mb|
|ePub File Size:||5.82 Mb|
|Price:||Free* [*Free Regsitration Required]|
By Vic Laurie Windows comes with several command-line tools for file management. The features and applications of Assoc and Ftype are discussed. Before discussing the file management tools, I would like to quickly review some of the basic facts about how Windows manages files. More details can be found at another site. A very basic property of a file is its file type. Each file type has a set of specific actions that can be carried out with it or to it.
The software that is assigned to do these actions with or to a particular file type is said to be "associated" with the file type.
There may be several actions and different software may be involved for each particular action. This set of software constitutes the program associations for a given file type.
The extension of a file is a tag that tells the computer what the file type is and what is to be done with the file when it is opened or double-clicked or otherwise invoked one way or the other.
Microsoft also uses the word "associate" in connection with file extensions and refers to an extension being associated with a particular file type. All of this information is stored in the Registry and can be edited or changed in several ways. I have discussed methods that use the graphical interface on another site. Here we look at using the command line. Manage file type and extension associations with the "assoc" command This tool is very useful for managing the relationship or association between file extensions and file types.
For example, to see what file type is associated with. To delete the file type association for the file name extension. As an example, to associate the extension. For example, the file type "jpegfile" typically has both the extensions. Also note that it is possible to create your own file extensions and to associate them with a filetype.
You can also enter. Back to top Manage file type and program associations with the "ftype" command As previously mentioned, each file type has a set of operations and corresponding software associated with it. In particular, all active file types have an action named "Open" that is the default action. This is the action that is invoked when you double-click a file with an extension associated with the file type.
There may also be other actions listed in the Context Menu but ftype deals with "Open". The "Open" action is defined by a string that includes the fully qualified path to the executable file that is to carry out the action and any parameters that must be passed to the executable.
It can be quite a long list so it is best to redirect to a file or to pipe to the "more" command. Having the list can be convenient as a record of what programs are being used to open various files. If a particular file type is specified, then the command string for that file type will be displayed.
This is necessary because the full command for the open action requires the name of the file that is to be opened. This command is useful when you want to see what program opens a particular file type. This example is for illustration only. Note the use of quotation marks to enclose a path with spaces in it. While changing program associations may be easier using the Windows Explorer Tools-Folder Options dialog no typing required , the command line method can also be useful, especially in batch files.
Windows command line: assoc and ftype
Subscribe to RSS
How to tell what program will open a particular file extension