Aliases in Windows command prompt

后端 未结 16 2700
故里飘歌
故里飘歌 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:34

    This solution is not an apt one, but serves purpose in some occasions.

    First create a folder and add it to your system path. Go to the executable of whatever program you want to create alias for. Right click and send to Desktop( Create Shortcut). Rename the shortcut to whatever alias name is comfortable. Now, take the shortcut and place in your folder.

    From run prompt you can type the shortcut name directly and you can have the program opened for you. But from command prompt, you need to append .lnk and hit enter, the program will be opened.

提交回复
热议问题