Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
627 views
in Technique[技术] by (71.8m points)

terminal - Custom commands in windows Command Prompt

How do I write a custom command to open files with Notepad++ text editor in Windows Command prompt.

For eg.

C:Sites>ntp abc.txt

opens the file abc.txt in Notepad++

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Create a batch file containing this line

@START c:Program FilesNotepad++
otepad++.exe "%1"

and put it into some directory that is in your PATH list (or, alternatively, add a directory with a .bat file to PATH).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...