Why can't I launch notepad++ from the command line anymore?
Solution 1
Most likely the directory in which the Notepad++ executable resides is not in your system's PATH. For information about fixing this please see How to set the path in Windows 2000 / Windows XP.
Solution 2
In a windows terminal, you can launch notepad++ with the following:
start notepad++ <filename>
Note that the filename is optional.
Solution 3
If you are using gitbash
or cygwin
, you can create an alias
alias np='start notepad++'
And use
np myfile.txt
Solution 4
This is what I have done, in this way you dont have to type notepad++
Create np.bat
file with this set of commands
@echo off
start "" "C:\Program Files (x86)\Notepad++\notepad++.exe" %*
place np.bat
file in c:\Windows
open the command prompt and type np
or np myfile.txt
and enter.
bflora2
Updated on June 30, 2022Comments
-
bflora2 almost 2 years
I'm teaching myself some Django tonight using the local dev package at instantdjango.com
I made it through half the tutorial, building a basic map with points on it, then closed out of the console for a bit. I just fired it back up and now when I try to use notepad++ to edit files, console tells me it doesn't recognize the command. What happened?
When I as working through the first half, I was able to type: "notepad++ filename.ext" and I'd get a text editor that would pop up.
Now when I type that, it doesn't recognize the command.
How do I get back the ability to use the text editor and how did I lose it?
-
bflora2 over 14 yearsDoes this explain why it was working the first time I started the Django dev environment but not the second?
-
Dimitrios Mistriotis over 13 yearsIs it possible to add a batch file wrapper in an another directory that resides within the %PATH% in order to keep the %PATH% as small as possible?
-
computingfreak over 7 yearsworks with git bash as well, just confirmed, thanks!