This question already has an answer here:

I'm having problem with Team Foundation Server (TFS) when viewing .cs files and need to delete the file association with .cs in Windows 7. At the moment I go to Control Panel -> Default Programs trying to do this, but it seems to have no way to delete other than change the current association. So, how can I do it?

marked as duplicate by Peter Mortensen, Tog, Mokubai, Dave M, Shekhar Sep 7 '13 at 21:26

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  1. Open an elevated command prompt with administrator privileges.

  2. Remove the file extension association from its assigned file. Type in the following command and press Enter:

    assoc .ext=

    Replace .ext with the extension name that needs to be disassociated. For example, to disassociate WinRAR's .rar extension, simply type: assoc .rar =

    Note that after disassociation of a file extension from file type, the default program for the file type will no longer be shown in the "Open With" list for the file extension.

  3. Clear and delete the default program used for the Open command when launching files of this type. Enter the following command and press Enter:

    ftype FileType=

    Replace "FileType" with the actual name for the file type associated to the file extension to be removed from the system. For example, for WinRAR, type ftype WinRAR=

    Note that if you don't know the correct "FileType", simply type assoc (associated file type will be shown after the extension) or ftype to get a listing of all file types defined in the system.

  • Would you suggest what command I should use with .cs (C#) files for the two command? – Nam G VU Jul 4 '10 at 17:12
  • 2
    when i execute the #2 step, "File association not found for extension .xxx" appears.. but when i look in Default Programs > Set Associations, the .xxx file has its current default association. i'm a bit confused... what did i missed out? 0_0 – CMA Apr 2 '13 at 2:23
  • Thank you for pointing this out. Never heard before, it saved my day! – jlandercy Nov 8 '16 at 15:07
  • @CMA you will also need to change in registry if you changed by Explorer: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.py (see superuser.com/a/49617/185071) – Liviu Jan 2 '18 at 13:58
  • You can filter desired ftypes with a command: ftype | findstr python gives every association containing "python" – Rabash Apr 11 at 20:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.