Notepad++ refuses to always be the choice for a filetype

2013-06-12
2013-06-16
  • Rafael Dolfe

    Rafael Dolfe - 2013-06-12

    Hello!

    I am trying to make Notepad++ the instant choice for a specific filetype, in this case ".hps". But simply attempting to add it with right-click, then "open with", then checking the "always open with this program" box and browsing and choosing Notepad++, does not work. When I choose notepad++ nothing happens...

    This should be a really simple problem... it worked earlier, and I've tried to reinstall it, but that doesn't work. Please help, it's really annoying!

     
  • Rafael Dolfe

    Rafael Dolfe - 2013-06-12

    bump... would be nice to have fixed!

     
  • DV

    DV - 2013-06-12

    I've found that managing this from command line seems to be the simplest (at least fastest - since you don't need to walk through tens of GUI windows or searching & modifying the Registry manually) way to do it.
    All you need are "assoc" and "ftype". Run "assoc /?" and "ftype /?" to see its help and usage examples - or just google for these commands.

     
  • Rafael Dolfe

    Rafael Dolfe - 2013-06-13

    Using the formula "assoc .<xxx>=<file type="">", I've tried writing in the CMD: "assoc .hps=notepad++" but it simply replied that "A failure occured in the treatment of: .hps". .hps is a legitimate file extension (it is used for the programming of a game). "file type" is, on the other hand, a very ambiguous term, but I can only assume I have to write notepad++ since I don't see how it could find that program any other way.

    What should I write instead of "notepad++" which I assume is the fault here...!
    Cheers. :)

     
  • DV

    DV - 2013-06-13

    The "assoc" and "ftype" should be used in pair as shown by "assoc /?".
    Try this (be sure to adjust the full path to notepad++.exe if you have it installed into a different folder):

    ftype notepad++="C:\Program Files\Notepad++\notepad++.exe" "%1"
    assoc .hps=notepad++

    P.S.
    Once you have the "notepad++" specified by ftype, you can easily assoc other extensions e.g.

    assoc .txt=notepad++
    assoc .ini=notepad++

    and so on.

     
    Last edit: DV 2013-06-13
  • Rafael Dolfe

    Rafael Dolfe - 2013-06-16

    I'm typing "ftype notepad++='C:\Program (x86)\Notepad++\notepad++.exe'", since instead of Program Files, the map is named Program (x86).
    It only gives the reply "The file type notepad++ could not be found, or so exists no opening commands associated with it." Weirdest error message, but yeah... the problem seems to be that it cannot find the file, since it is in "Program (x86)" instead of "Program Files". I don't know why that makes such a big deal though... -.- HEPL! :D

    EDIT: Sorry for such slow replies, also...

     
    Last edit: Rafael Dolfe 2013-06-16
  • DV

    DV - 2013-06-16

    Are you dealing with Windows 8? If so, I'm afraid you need to google for something like "Windows 8 file association" yourself. In Windows 8, they managed to make file associations as complicated as it can be, and the old ways do not seem to work there.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks