I have added notepad++.exe
to my Path in Environment variables.
Now in command prompt, notepad++.exe filename.txt
opens the filename
Using doskey is the right way to do this, but it resets when the Command Prompt window is closed. You need to add that line to something like .bashrc equivalent. So I did the following:
Works just fine!