Aliases in Windows command prompt

后端 未结 16 2708
故里飘歌
故里飘歌 2020-11-22 10:47

I have added notepad++.exe to my Path in Environment variables.

Now in command prompt, notepad++.exe filename.txt opens the filename

16条回答
  •  遥遥无期
    2020-11-22 11:40

    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:

    1. Add "C:\Program Files (x86)\Notepad++" to system path variable
    2. Make a copy of notepad++.exe (in the same folder, of course) and rename it to np.exe

    Works just fine!

提交回复
热议问题