Notepad++ assumes .txt file extension when loading from a command line

notepad

I have a file called Dockerfile in my directory:

enter image description here

I'm attempting to edit that file in Notepad++, so I type the command:

notepad Dockerfile

Notepad++ comes up, but it tries to open a file called Dockerfile.txt which doesn't exist:

enter image description here

Is there a way to configure Notepad++ to load the file given at the command line, and not assume it has any particular extension? Thanks!

Note: On my machine, Notepad.exe has been overwritten to point to Notepad++.

Best Answer

  1. The standard filename for Notepad++ is Notepad++.exe, no notepad.exe. The last is the Windows standard notepad. So try

    notepad++ Dockerfile
    
  2. If it doesn't help, append the filename with the period (.):

    notepad++ Dockerfile.
    

    or - if your filename for Notepad++ is nevertheless notepad.exe:

    notepad Dockerfile.
    
Related Question