Custom commands in windows Command Prompt Custom commands in windows Command Prompt windows windows

Custom commands in windows Command Prompt


Create a batch file containing this line

@START c:\Program Files\Notepad++\notepad++.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).


You can use doskey. Try:

doskey ntp=notepadpp.exe

and now you can do simply:

ntp blah.txt


Create a .bat file and save it as npt.bat

In that file put the following line of code (or change it to match the path to your notepad++.exe))

@START c:\"Program Files (x86)"\Notepad++\notepad++.exe "%1"

Note that you need quotation marks around any parts of the path with spaces in it.

Now place it in whatever directory you like and add the directory to PATH in your User variables.