The FTYPE command in Windows CMD is used to display or modify file types used in file extension associations. This command lets you define which application will be used to open a specific file type. It’s most effective in managing and troubleshooting how files are opened from the command line environment, perfect for system administrators and power users who need to customize application behaviors based on file extensions.


The basic usage syntax for FTYPE is as follows:

FTYPE [fileType[=[openCommandString]]]
  • fileType: Specifies the file type to examine or change.
  • openCommandString: Defines the application used to open files of the type fileType.


  • Display all file types: Simply run FTYPE without arguments.
  • Set a file type: Include both fileType and openCommandString to set a new association.


The FTYPE command is straightforward and does not have multiple flags or options. It mainly revolves around the assignment presented in the syntax or reviewing the current file associations.


  1. Viewing all file type associations:


    This command lists all current file type associations defined in the system.

  2. Checking the association for a specific file type:

    FTYPE txtfile

    This will show what program is associated with .txt files, if set.

  3. Setting an association for a file type:

    FTYPE txtfile="C:\Program Files\Notepad++\notepad++.exe" "%1"

    This command sets Notepad++ as the default app for opening .txt files.

Common Issues

  • Ambiguity in File Types: Users must specify exact file types. Mismatched or misspelled file type identifiers won’t return errors but won’t affect the intended changes.
  • Admin Rights: Changing file associations typically requires administrator privileges; failing to have these rights can lead to the command not executing changes.


The FTYPE command can be used in conjunction with the ASSOC command, which associates a file extension with a file type:

  • Set a complete file association chain:
    ASSOC .log=logFile
    FTYPE logFile="C:\Program Files\Viewer\viewer.exe" "%1"

This sequence first associates the .log extension to the file type logFile, then specifies which application opens .log files.

  • ASSOC: Displays or modifies file extension associations with file types.
  • DIR / ATTRIB: Useful for listing files and attributes when managing types and associations graphically.

Additional resources can be found in the Windows command line documentation or Microsoft online help services to provide further guidance on using FTYPE and related commands.