How do I start Notepad++ from cmd?
I can start the regular Notepad from cmd.
C:Windows>notepad
I can also start it from the run prompt.
- Win+R
- notepad
- Enter
I want to be able to do the same with the Notepad++. I can start it from the run prompt, but I can't start it from cmd.
I can also open a specific file in Notepad from cmd.
C:Windows>notepad d:mytext.txt
I want to be able to do the same with Notepad++.
Is this possible, and what can I do to enable this?
command-line windows-vista notepad++
add a comment |
I can start the regular Notepad from cmd.
C:Windows>notepad
I can also start it from the run prompt.
- Win+R
- notepad
- Enter
I want to be able to do the same with the Notepad++. I can start it from the run prompt, but I can't start it from cmd.
I can also open a specific file in Notepad from cmd.
C:Windows>notepad d:mytext.txt
I want to be able to do the same with Notepad++.
Is this possible, and what can I do to enable this?
command-line windows-vista notepad++
1
In Windows Vista, Windows 7, 8you can you can use start menu search box like run command. No need to press Win+R. Press Win and type in search box. Try it!
– Kamil
Aug 26 '14 at 0:25
(Not enough rep to answer). If you want to open a file whose extension is associated to NotePad++, just type the full filename:d:mytext.txtand it will be open in the default app. You cannot pass CL arguments, but quick enough if you just want to open the file
– cbuchart
Nov 19 '18 at 11:30
add a comment |
I can start the regular Notepad from cmd.
C:Windows>notepad
I can also start it from the run prompt.
- Win+R
- notepad
- Enter
I want to be able to do the same with the Notepad++. I can start it from the run prompt, but I can't start it from cmd.
I can also open a specific file in Notepad from cmd.
C:Windows>notepad d:mytext.txt
I want to be able to do the same with Notepad++.
Is this possible, and what can I do to enable this?
command-line windows-vista notepad++
I can start the regular Notepad from cmd.
C:Windows>notepad
I can also start it from the run prompt.
- Win+R
- notepad
- Enter
I want to be able to do the same with the Notepad++. I can start it from the run prompt, but I can't start it from cmd.
I can also open a specific file in Notepad from cmd.
C:Windows>notepad d:mytext.txt
I want to be able to do the same with Notepad++.
Is this possible, and what can I do to enable this?
command-line windows-vista notepad++
command-line windows-vista notepad++
edited May 19 '17 at 16:06
Steven M. Vascellaro
4,461164997
4,461164997
asked Jun 13 '13 at 21:08
SamirSamir
11.2k56143205
11.2k56143205
1
In Windows Vista, Windows 7, 8you can you can use start menu search box like run command. No need to press Win+R. Press Win and type in search box. Try it!
– Kamil
Aug 26 '14 at 0:25
(Not enough rep to answer). If you want to open a file whose extension is associated to NotePad++, just type the full filename:d:mytext.txtand it will be open in the default app. You cannot pass CL arguments, but quick enough if you just want to open the file
– cbuchart
Nov 19 '18 at 11:30
add a comment |
1
In Windows Vista, Windows 7, 8you can you can use start menu search box like run command. No need to press Win+R. Press Win and type in search box. Try it!
– Kamil
Aug 26 '14 at 0:25
(Not enough rep to answer). If you want to open a file whose extension is associated to NotePad++, just type the full filename:d:mytext.txtand it will be open in the default app. You cannot pass CL arguments, but quick enough if you just want to open the file
– cbuchart
Nov 19 '18 at 11:30
1
1
In Windows Vista, Windows 7, 8you can you can use start menu search box like run command. No need to press Win+R. Press Win and type in search box. Try it!
– Kamil
Aug 26 '14 at 0:25
In Windows Vista, Windows 7, 8you can you can use start menu search box like run command. No need to press Win+R. Press Win and type in search box. Try it!
– Kamil
Aug 26 '14 at 0:25
(Not enough rep to answer). If you want to open a file whose extension is associated to NotePad++, just type the full filename:
d:mytext.txt and it will be open in the default app. You cannot pass CL arguments, but quick enough if you just want to open the file– cbuchart
Nov 19 '18 at 11:30
(Not enough rep to answer). If you want to open a file whose extension is associated to NotePad++, just type the full filename:
d:mytext.txt and it will be open in the default app. You cannot pass CL arguments, but quick enough if you just want to open the file– cbuchart
Nov 19 '18 at 11:30
add a comment |
9 Answers
9
active
oldest
votes
You could add C:Program Files (x86)Notepad++ to your PATH environment variable.
For example, you could run the following on the command prompt:
set PATH=%PATH%;C:Program Files (x86)Notepad++
For further options, see What are PATH and other environment variables, and how can I set or use them?
Thanks! It works now. Now I can donotepad++ %userprofile%desktoptestfile.txtwhich is nice. I used the Environment Variables dialog box for this. What's the syntax for removing an environment variable using the set command? I couldn't find any specific switches or syntax for this. Not on the link you provided and not on the Computer Hope website.
– Samir
Jun 13 '13 at 21:24
1
@Sammy: Removing a single directory from thePATHvariable is best done through the GUI, I assume. I don't know how to quickly remove it from the command line. If you want to completely remove an environment variable, you can useset something=, but I wouldn't advise you to do that forPATH.
– Der Hochstapler
Jun 13 '13 at 21:26
I found a path command. I understand I'm supposed to use semi colon to delete a path in the PATH variable?... I'm not sure how.
– Samir
Jun 13 '13 at 21:32
Usingpath ;clears the search path settings for the current instance of cmd. It doesn't actually remove the search paths from the PATH variable. By opening a new cmd window the search path settings are restored. Oh well, I guess I will use the GUI then.
– Samir
Jun 13 '13 at 21:47
4
This is worth noting: "Changes made with SET will remain only for the duration of the current CMD session." This can be found here. And it says that Set command is used to display, set, or remove CMD environment variables. So Set command can be used to remove the whole variable, in this example the PATH variable. And again, it will not be permanently removed from Windows. It is only valid for the duration of the CMD session. To permanently set an environment variable from CMD, the Setx command should be used instead. Either that or GUI.
– Samir
Jun 13 '13 at 22:09
|
show 2 more comments
Even though the Notepad++ directory is not in your path, you can use the command below to run the program from the command prompt:
start notepad++
To open a file in Notepad++, run:
start notepad++ <filename>
9
Not only this answers the original question, this is a very clever workaround that works immediately without having to setup anything. Worked great for me.
– Sergio Acosta
Nov 27 '14 at 17:53
9
Love it. Adding everything to the PATH is a horrible solution on windows. What isn't clear is where START searches to find possible commands if it isn't the path. Is it looking through the stuff installed in the start menu?
– user10550
Dec 16 '14 at 14:36
and it works also if you are in a cygwin shell: cygstart notepad++
– laika
Feb 17 '16 at 17:03
1
Awesome! I use this after search some string withfindstr /spim /c:"SomeString" *.*.
– Paul Vargas
Mar 22 '16 at 21:02
@user10550 I'm pretty sure Start references stuff in LibrariesC:UsersusernameAppDataRoamingMicrosoftWindowswhere as the $PATH variable is much different. You can actually specify what Start -> search references. More Detail
– Kolob Canyon
Sep 30 '16 at 15:06
|
show 1 more comment
I would not want to clutter my PATH just for using a single tool.
One alternative is to use an alternative text editor as 100% replacement for Notepad as explained here with many details. Another description with a dedicated editor launcher tool can be found here. Another Notepad++ launcher on github.
A less invasive alternative is a cmd file like this:
"C:ProgrammeNotepad++notepad++.exe" %*
This file has to reside somewhere along the existing PATH.
I actually put all my tools in one common UTIL directory, which is part of PATH.
What do you mean by "cmd file"? And what's with the asterisk and the percent sign? What file has to reside "along" the PATH? (It's not like it's going somewhere.) How do you make use of UTIL? Last time I checked there is no variable called UTIL. Is this something you came up yourself and added manually to the system? Can you explain any of this? And maybe give me some concrete example I can work with and hopefully learn from? Or are you just here to brag about how you know command line? I don't mean to be rude or anything, I'm just saying how it is. We all have different skill levels.
– Samir
Jun 14 '13 at 15:33
2
A cmd file could be the text script file npp.cmd which has the command as single text line inside. If you create a directory c:util and put the script file into it, extend your PATH by c:util, you from then on can call Notepad++ by typing "npp". %* stands for "all commandline arguments".
– Axel Kemper
Jun 14 '13 at 17:41
1
A cmd file is often called a "batch file". In the days of MS-DOS, the extension was always.BATbut these days it is often.cmd. The commands in the file are executed bycmd.exewhich is the command-line shell itself.
– steveha
Oct 23 '13 at 7:04
Please note that in PowerShell the syntax for updating the PATH Environment Variable is a little different stackoverflow.com/a/1333717/47226
– Aaron Hoffman
Jun 28 '15 at 16:00
1
It looks like your link to the article on how to replace Notepad is broken already.
– RobH
Feb 2 '18 at 21:38
|
show 4 more comments
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.
Using start "" to prefix the command here prevents locking up the command prompt if a notepad++.exe is not already running.
– Jeremy Murray
Nov 6 '18 at 21:26
add a comment |
Combining the answers from Axel Kemper and adding some extra's, here is what I did to make a permanent command that you can give any name you want.
First of all I created an extra folder. In my case: "C:UsersHanselCmdFiles". In this folder I created a new text file throught the right click menu -> new -> text document. Edit the text document using notepad or notepad++ and type the following code in the .txt file:
@echo off
"C:SoftwareNotepad++notepad++.exe" %*
Then you have to rename the file to your personal command, for example "npp.cmd".
On a side note: the @echo off prevents the command from printing to
the command prompt;
the link between the quotation marks can refer to any executable;
*%** will make sure that anything you type after the
npp command (for example "npp nonsense.txt") will be put after the original command in the quotation marks.
Then you need to edit an "environment variable", in this case the so called PATH (this variable contains the folders where Windows looks for commands and executables). To add the folder to your PATH, push the windows button to enter the start menu and type "edit environment variables for your account". Under "User variables for Hansel", create a new "Path" variable if it does not exist or edit the old "Path" variable if there is one.
If you make a new PATH variable, the variable value should just read: C:UsersHansCmdFiles
If you edit an old PATH variable, the variable value should read: oldstuff;C:UsersHansCmdFiles (mind the semi colon).
Windows now looks for commands in the folder "C:UsersHanselCmdFiles" and you can easily add new commands to this folder!
8
You don't need@ECHO OFFfor a one-line command. The@suppresses echo for that line alone, so@"C:SoftwareNotepad++notepad++.exe" %*does what you want.
– Clement Cherlin
Apr 15 '15 at 17:16
add a comment |
A simple way to run any program installed on Windows from command is:
Find the location of notepad++.exe, create a shortcut under the installation directory.
cut and paste the shortcut to C:/windows/system 32.
Now you can press 'Win + R' and type the name of shortcut. All done.
PS: in my case, I named the shortcut 'notepadpp' (or even 'nppp') so that I don't have to press 'shift + =' twice for '+' symbol
Extremely simple and easy, and it's easy to delete the shortcut. You don't even need to change the path, registry
add a comment |
One way is to make a change to this registry key:
[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionApp PathsNotepad++.exe]
You can download a zipped .reg file from Donn Felker that lets you open a file with just an n shortcut.
I edited the .reg before running it and to make sure the path to Notepad++ is correct (e.g. C:Program Files (x86)) and I also changed the shortcut to n instead of n.
Then double click to add to your registry.
add a comment |
To run any program from command line with a short name you can create an alias for it by the command doskey:
doskey alias="drive:path to programexecutable" $*
For example, after running commanddoskey notepad++="C:Program Files (x86)Notepad++notepad++.exe" $*
you can open the text file with notepad++ by notepad++ textfile. Of course, you can use shorter alias something as npp or n++.
Also you can create alias for some path you often open:
doskey home=cd C:Usersmyprofile
But unfortunately you cannot use this alias in path. If you run doskey home=C:Usersmyprofile and then enter in the command line cd home or start homemyfile you receive error message.
To create your aliases automatically each time when cmd runs you can put its into the batch file like autorun.cmd and set it in the registry entry:
HKCUSoftwareMicrosoftCommand ProcessorAutoRun
or
HKLMSoftwareMicrosoftCommand ProcessorAutoRun
Links to the articles:
Console Aliases
Command ProcessorAutoRun
add a comment |
Add the program directory to your PATH.
add a comment |
protected by Community♦ Apr 3 '18 at 13:07
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
9 Answers
9
active
oldest
votes
9 Answers
9
active
oldest
votes
active
oldest
votes
active
oldest
votes
You could add C:Program Files (x86)Notepad++ to your PATH environment variable.
For example, you could run the following on the command prompt:
set PATH=%PATH%;C:Program Files (x86)Notepad++
For further options, see What are PATH and other environment variables, and how can I set or use them?
Thanks! It works now. Now I can donotepad++ %userprofile%desktoptestfile.txtwhich is nice. I used the Environment Variables dialog box for this. What's the syntax for removing an environment variable using the set command? I couldn't find any specific switches or syntax for this. Not on the link you provided and not on the Computer Hope website.
– Samir
Jun 13 '13 at 21:24
1
@Sammy: Removing a single directory from thePATHvariable is best done through the GUI, I assume. I don't know how to quickly remove it from the command line. If you want to completely remove an environment variable, you can useset something=, but I wouldn't advise you to do that forPATH.
– Der Hochstapler
Jun 13 '13 at 21:26
I found a path command. I understand I'm supposed to use semi colon to delete a path in the PATH variable?... I'm not sure how.
– Samir
Jun 13 '13 at 21:32
Usingpath ;clears the search path settings for the current instance of cmd. It doesn't actually remove the search paths from the PATH variable. By opening a new cmd window the search path settings are restored. Oh well, I guess I will use the GUI then.
– Samir
Jun 13 '13 at 21:47
4
This is worth noting: "Changes made with SET will remain only for the duration of the current CMD session." This can be found here. And it says that Set command is used to display, set, or remove CMD environment variables. So Set command can be used to remove the whole variable, in this example the PATH variable. And again, it will not be permanently removed from Windows. It is only valid for the duration of the CMD session. To permanently set an environment variable from CMD, the Setx command should be used instead. Either that or GUI.
– Samir
Jun 13 '13 at 22:09
|
show 2 more comments
You could add C:Program Files (x86)Notepad++ to your PATH environment variable.
For example, you could run the following on the command prompt:
set PATH=%PATH%;C:Program Files (x86)Notepad++
For further options, see What are PATH and other environment variables, and how can I set or use them?
Thanks! It works now. Now I can donotepad++ %userprofile%desktoptestfile.txtwhich is nice. I used the Environment Variables dialog box for this. What's the syntax for removing an environment variable using the set command? I couldn't find any specific switches or syntax for this. Not on the link you provided and not on the Computer Hope website.
– Samir
Jun 13 '13 at 21:24
1
@Sammy: Removing a single directory from thePATHvariable is best done through the GUI, I assume. I don't know how to quickly remove it from the command line. If you want to completely remove an environment variable, you can useset something=, but I wouldn't advise you to do that forPATH.
– Der Hochstapler
Jun 13 '13 at 21:26
I found a path command. I understand I'm supposed to use semi colon to delete a path in the PATH variable?... I'm not sure how.
– Samir
Jun 13 '13 at 21:32
Usingpath ;clears the search path settings for the current instance of cmd. It doesn't actually remove the search paths from the PATH variable. By opening a new cmd window the search path settings are restored. Oh well, I guess I will use the GUI then.
– Samir
Jun 13 '13 at 21:47
4
This is worth noting: "Changes made with SET will remain only for the duration of the current CMD session." This can be found here. And it says that Set command is used to display, set, or remove CMD environment variables. So Set command can be used to remove the whole variable, in this example the PATH variable. And again, it will not be permanently removed from Windows. It is only valid for the duration of the CMD session. To permanently set an environment variable from CMD, the Setx command should be used instead. Either that or GUI.
– Samir
Jun 13 '13 at 22:09
|
show 2 more comments
You could add C:Program Files (x86)Notepad++ to your PATH environment variable.
For example, you could run the following on the command prompt:
set PATH=%PATH%;C:Program Files (x86)Notepad++
For further options, see What are PATH and other environment variables, and how can I set or use them?
You could add C:Program Files (x86)Notepad++ to your PATH environment variable.
For example, you could run the following on the command prompt:
set PATH=%PATH%;C:Program Files (x86)Notepad++
For further options, see What are PATH and other environment variables, and how can I set or use them?
edited Mar 20 '17 at 10:17
Community♦
1
1
answered Jun 13 '13 at 21:10
Der HochstaplerDer Hochstapler
67.9k49230285
67.9k49230285
Thanks! It works now. Now I can donotepad++ %userprofile%desktoptestfile.txtwhich is nice. I used the Environment Variables dialog box for this. What's the syntax for removing an environment variable using the set command? I couldn't find any specific switches or syntax for this. Not on the link you provided and not on the Computer Hope website.
– Samir
Jun 13 '13 at 21:24
1
@Sammy: Removing a single directory from thePATHvariable is best done through the GUI, I assume. I don't know how to quickly remove it from the command line. If you want to completely remove an environment variable, you can useset something=, but I wouldn't advise you to do that forPATH.
– Der Hochstapler
Jun 13 '13 at 21:26
I found a path command. I understand I'm supposed to use semi colon to delete a path in the PATH variable?... I'm not sure how.
– Samir
Jun 13 '13 at 21:32
Usingpath ;clears the search path settings for the current instance of cmd. It doesn't actually remove the search paths from the PATH variable. By opening a new cmd window the search path settings are restored. Oh well, I guess I will use the GUI then.
– Samir
Jun 13 '13 at 21:47
4
This is worth noting: "Changes made with SET will remain only for the duration of the current CMD session." This can be found here. And it says that Set command is used to display, set, or remove CMD environment variables. So Set command can be used to remove the whole variable, in this example the PATH variable. And again, it will not be permanently removed from Windows. It is only valid for the duration of the CMD session. To permanently set an environment variable from CMD, the Setx command should be used instead. Either that or GUI.
– Samir
Jun 13 '13 at 22:09
|
show 2 more comments
Thanks! It works now. Now I can donotepad++ %userprofile%desktoptestfile.txtwhich is nice. I used the Environment Variables dialog box for this. What's the syntax for removing an environment variable using the set command? I couldn't find any specific switches or syntax for this. Not on the link you provided and not on the Computer Hope website.
– Samir
Jun 13 '13 at 21:24
1
@Sammy: Removing a single directory from thePATHvariable is best done through the GUI, I assume. I don't know how to quickly remove it from the command line. If you want to completely remove an environment variable, you can useset something=, but I wouldn't advise you to do that forPATH.
– Der Hochstapler
Jun 13 '13 at 21:26
I found a path command. I understand I'm supposed to use semi colon to delete a path in the PATH variable?... I'm not sure how.
– Samir
Jun 13 '13 at 21:32
Usingpath ;clears the search path settings for the current instance of cmd. It doesn't actually remove the search paths from the PATH variable. By opening a new cmd window the search path settings are restored. Oh well, I guess I will use the GUI then.
– Samir
Jun 13 '13 at 21:47
4
This is worth noting: "Changes made with SET will remain only for the duration of the current CMD session." This can be found here. And it says that Set command is used to display, set, or remove CMD environment variables. So Set command can be used to remove the whole variable, in this example the PATH variable. And again, it will not be permanently removed from Windows. It is only valid for the duration of the CMD session. To permanently set an environment variable from CMD, the Setx command should be used instead. Either that or GUI.
– Samir
Jun 13 '13 at 22:09
Thanks! It works now. Now I can do
notepad++ %userprofile%desktoptestfile.txt which is nice. I used the Environment Variables dialog box for this. What's the syntax for removing an environment variable using the set command? I couldn't find any specific switches or syntax for this. Not on the link you provided and not on the Computer Hope website.– Samir
Jun 13 '13 at 21:24
Thanks! It works now. Now I can do
notepad++ %userprofile%desktoptestfile.txt which is nice. I used the Environment Variables dialog box for this. What's the syntax for removing an environment variable using the set command? I couldn't find any specific switches or syntax for this. Not on the link you provided and not on the Computer Hope website.– Samir
Jun 13 '13 at 21:24
1
1
@Sammy: Removing a single directory from the
PATH variable is best done through the GUI, I assume. I don't know how to quickly remove it from the command line. If you want to completely remove an environment variable, you can use set something=, but I wouldn't advise you to do that for PATH.– Der Hochstapler
Jun 13 '13 at 21:26
@Sammy: Removing a single directory from the
PATH variable is best done through the GUI, I assume. I don't know how to quickly remove it from the command line. If you want to completely remove an environment variable, you can use set something=, but I wouldn't advise you to do that for PATH.– Der Hochstapler
Jun 13 '13 at 21:26
I found a path command. I understand I'm supposed to use semi colon to delete a path in the PATH variable?... I'm not sure how.
– Samir
Jun 13 '13 at 21:32
I found a path command. I understand I'm supposed to use semi colon to delete a path in the PATH variable?... I'm not sure how.
– Samir
Jun 13 '13 at 21:32
Using
path ; clears the search path settings for the current instance of cmd. It doesn't actually remove the search paths from the PATH variable. By opening a new cmd window the search path settings are restored. Oh well, I guess I will use the GUI then.– Samir
Jun 13 '13 at 21:47
Using
path ; clears the search path settings for the current instance of cmd. It doesn't actually remove the search paths from the PATH variable. By opening a new cmd window the search path settings are restored. Oh well, I guess I will use the GUI then.– Samir
Jun 13 '13 at 21:47
4
4
This is worth noting: "Changes made with SET will remain only for the duration of the current CMD session." This can be found here. And it says that Set command is used to display, set, or remove CMD environment variables. So Set command can be used to remove the whole variable, in this example the PATH variable. And again, it will not be permanently removed from Windows. It is only valid for the duration of the CMD session. To permanently set an environment variable from CMD, the Setx command should be used instead. Either that or GUI.
– Samir
Jun 13 '13 at 22:09
This is worth noting: "Changes made with SET will remain only for the duration of the current CMD session." This can be found here. And it says that Set command is used to display, set, or remove CMD environment variables. So Set command can be used to remove the whole variable, in this example the PATH variable. And again, it will not be permanently removed from Windows. It is only valid for the duration of the CMD session. To permanently set an environment variable from CMD, the Setx command should be used instead. Either that or GUI.
– Samir
Jun 13 '13 at 22:09
|
show 2 more comments
Even though the Notepad++ directory is not in your path, you can use the command below to run the program from the command prompt:
start notepad++
To open a file in Notepad++, run:
start notepad++ <filename>
9
Not only this answers the original question, this is a very clever workaround that works immediately without having to setup anything. Worked great for me.
– Sergio Acosta
Nov 27 '14 at 17:53
9
Love it. Adding everything to the PATH is a horrible solution on windows. What isn't clear is where START searches to find possible commands if it isn't the path. Is it looking through the stuff installed in the start menu?
– user10550
Dec 16 '14 at 14:36
and it works also if you are in a cygwin shell: cygstart notepad++
– laika
Feb 17 '16 at 17:03
1
Awesome! I use this after search some string withfindstr /spim /c:"SomeString" *.*.
– Paul Vargas
Mar 22 '16 at 21:02
@user10550 I'm pretty sure Start references stuff in LibrariesC:UsersusernameAppDataRoamingMicrosoftWindowswhere as the $PATH variable is much different. You can actually specify what Start -> search references. More Detail
– Kolob Canyon
Sep 30 '16 at 15:06
|
show 1 more comment
Even though the Notepad++ directory is not in your path, you can use the command below to run the program from the command prompt:
start notepad++
To open a file in Notepad++, run:
start notepad++ <filename>
9
Not only this answers the original question, this is a very clever workaround that works immediately without having to setup anything. Worked great for me.
– Sergio Acosta
Nov 27 '14 at 17:53
9
Love it. Adding everything to the PATH is a horrible solution on windows. What isn't clear is where START searches to find possible commands if it isn't the path. Is it looking through the stuff installed in the start menu?
– user10550
Dec 16 '14 at 14:36
and it works also if you are in a cygwin shell: cygstart notepad++
– laika
Feb 17 '16 at 17:03
1
Awesome! I use this after search some string withfindstr /spim /c:"SomeString" *.*.
– Paul Vargas
Mar 22 '16 at 21:02
@user10550 I'm pretty sure Start references stuff in LibrariesC:UsersusernameAppDataRoamingMicrosoftWindowswhere as the $PATH variable is much different. You can actually specify what Start -> search references. More Detail
– Kolob Canyon
Sep 30 '16 at 15:06
|
show 1 more comment
Even though the Notepad++ directory is not in your path, you can use the command below to run the program from the command prompt:
start notepad++
To open a file in Notepad++, run:
start notepad++ <filename>
Even though the Notepad++ directory is not in your path, you can use the command below to run the program from the command prompt:
start notepad++
To open a file in Notepad++, run:
start notepad++ <filename>
edited May 19 '17 at 13:03
aschultz
1361210
1361210
answered Oct 6 '14 at 10:40
sudha jallusudha jallu
1,081262
1,081262
9
Not only this answers the original question, this is a very clever workaround that works immediately without having to setup anything. Worked great for me.
– Sergio Acosta
Nov 27 '14 at 17:53
9
Love it. Adding everything to the PATH is a horrible solution on windows. What isn't clear is where START searches to find possible commands if it isn't the path. Is it looking through the stuff installed in the start menu?
– user10550
Dec 16 '14 at 14:36
and it works also if you are in a cygwin shell: cygstart notepad++
– laika
Feb 17 '16 at 17:03
1
Awesome! I use this after search some string withfindstr /spim /c:"SomeString" *.*.
– Paul Vargas
Mar 22 '16 at 21:02
@user10550 I'm pretty sure Start references stuff in LibrariesC:UsersusernameAppDataRoamingMicrosoftWindowswhere as the $PATH variable is much different. You can actually specify what Start -> search references. More Detail
– Kolob Canyon
Sep 30 '16 at 15:06
|
show 1 more comment
9
Not only this answers the original question, this is a very clever workaround that works immediately without having to setup anything. Worked great for me.
– Sergio Acosta
Nov 27 '14 at 17:53
9
Love it. Adding everything to the PATH is a horrible solution on windows. What isn't clear is where START searches to find possible commands if it isn't the path. Is it looking through the stuff installed in the start menu?
– user10550
Dec 16 '14 at 14:36
and it works also if you are in a cygwin shell: cygstart notepad++
– laika
Feb 17 '16 at 17:03
1
Awesome! I use this after search some string withfindstr /spim /c:"SomeString" *.*.
– Paul Vargas
Mar 22 '16 at 21:02
@user10550 I'm pretty sure Start references stuff in LibrariesC:UsersusernameAppDataRoamingMicrosoftWindowswhere as the $PATH variable is much different. You can actually specify what Start -> search references. More Detail
– Kolob Canyon
Sep 30 '16 at 15:06
9
9
Not only this answers the original question, this is a very clever workaround that works immediately without having to setup anything. Worked great for me.
– Sergio Acosta
Nov 27 '14 at 17:53
Not only this answers the original question, this is a very clever workaround that works immediately without having to setup anything. Worked great for me.
– Sergio Acosta
Nov 27 '14 at 17:53
9
9
Love it. Adding everything to the PATH is a horrible solution on windows. What isn't clear is where START searches to find possible commands if it isn't the path. Is it looking through the stuff installed in the start menu?
– user10550
Dec 16 '14 at 14:36
Love it. Adding everything to the PATH is a horrible solution on windows. What isn't clear is where START searches to find possible commands if it isn't the path. Is it looking through the stuff installed in the start menu?
– user10550
Dec 16 '14 at 14:36
and it works also if you are in a cygwin shell: cygstart notepad++
– laika
Feb 17 '16 at 17:03
and it works also if you are in a cygwin shell: cygstart notepad++
– laika
Feb 17 '16 at 17:03
1
1
Awesome! I use this after search some string with
findstr /spim /c:"SomeString" *.*.– Paul Vargas
Mar 22 '16 at 21:02
Awesome! I use this after search some string with
findstr /spim /c:"SomeString" *.*.– Paul Vargas
Mar 22 '16 at 21:02
@user10550 I'm pretty sure Start references stuff in Libraries
C:UsersusernameAppDataRoamingMicrosoftWindows where as the $PATH variable is much different. You can actually specify what Start -> search references. More Detail– Kolob Canyon
Sep 30 '16 at 15:06
@user10550 I'm pretty sure Start references stuff in Libraries
C:UsersusernameAppDataRoamingMicrosoftWindows where as the $PATH variable is much different. You can actually specify what Start -> search references. More Detail– Kolob Canyon
Sep 30 '16 at 15:06
|
show 1 more comment
I would not want to clutter my PATH just for using a single tool.
One alternative is to use an alternative text editor as 100% replacement for Notepad as explained here with many details. Another description with a dedicated editor launcher tool can be found here. Another Notepad++ launcher on github.
A less invasive alternative is a cmd file like this:
"C:ProgrammeNotepad++notepad++.exe" %*
This file has to reside somewhere along the existing PATH.
I actually put all my tools in one common UTIL directory, which is part of PATH.
What do you mean by "cmd file"? And what's with the asterisk and the percent sign? What file has to reside "along" the PATH? (It's not like it's going somewhere.) How do you make use of UTIL? Last time I checked there is no variable called UTIL. Is this something you came up yourself and added manually to the system? Can you explain any of this? And maybe give me some concrete example I can work with and hopefully learn from? Or are you just here to brag about how you know command line? I don't mean to be rude or anything, I'm just saying how it is. We all have different skill levels.
– Samir
Jun 14 '13 at 15:33
2
A cmd file could be the text script file npp.cmd which has the command as single text line inside. If you create a directory c:util and put the script file into it, extend your PATH by c:util, you from then on can call Notepad++ by typing "npp". %* stands for "all commandline arguments".
– Axel Kemper
Jun 14 '13 at 17:41
1
A cmd file is often called a "batch file". In the days of MS-DOS, the extension was always.BATbut these days it is often.cmd. The commands in the file are executed bycmd.exewhich is the command-line shell itself.
– steveha
Oct 23 '13 at 7:04
Please note that in PowerShell the syntax for updating the PATH Environment Variable is a little different stackoverflow.com/a/1333717/47226
– Aaron Hoffman
Jun 28 '15 at 16:00
1
It looks like your link to the article on how to replace Notepad is broken already.
– RobH
Feb 2 '18 at 21:38
|
show 4 more comments
I would not want to clutter my PATH just for using a single tool.
One alternative is to use an alternative text editor as 100% replacement for Notepad as explained here with many details. Another description with a dedicated editor launcher tool can be found here. Another Notepad++ launcher on github.
A less invasive alternative is a cmd file like this:
"C:ProgrammeNotepad++notepad++.exe" %*
This file has to reside somewhere along the existing PATH.
I actually put all my tools in one common UTIL directory, which is part of PATH.
What do you mean by "cmd file"? And what's with the asterisk and the percent sign? What file has to reside "along" the PATH? (It's not like it's going somewhere.) How do you make use of UTIL? Last time I checked there is no variable called UTIL. Is this something you came up yourself and added manually to the system? Can you explain any of this? And maybe give me some concrete example I can work with and hopefully learn from? Or are you just here to brag about how you know command line? I don't mean to be rude or anything, I'm just saying how it is. We all have different skill levels.
– Samir
Jun 14 '13 at 15:33
2
A cmd file could be the text script file npp.cmd which has the command as single text line inside. If you create a directory c:util and put the script file into it, extend your PATH by c:util, you from then on can call Notepad++ by typing "npp". %* stands for "all commandline arguments".
– Axel Kemper
Jun 14 '13 at 17:41
1
A cmd file is often called a "batch file". In the days of MS-DOS, the extension was always.BATbut these days it is often.cmd. The commands in the file are executed bycmd.exewhich is the command-line shell itself.
– steveha
Oct 23 '13 at 7:04
Please note that in PowerShell the syntax for updating the PATH Environment Variable is a little different stackoverflow.com/a/1333717/47226
– Aaron Hoffman
Jun 28 '15 at 16:00
1
It looks like your link to the article on how to replace Notepad is broken already.
– RobH
Feb 2 '18 at 21:38
|
show 4 more comments
I would not want to clutter my PATH just for using a single tool.
One alternative is to use an alternative text editor as 100% replacement for Notepad as explained here with many details. Another description with a dedicated editor launcher tool can be found here. Another Notepad++ launcher on github.
A less invasive alternative is a cmd file like this:
"C:ProgrammeNotepad++notepad++.exe" %*
This file has to reside somewhere along the existing PATH.
I actually put all my tools in one common UTIL directory, which is part of PATH.
I would not want to clutter my PATH just for using a single tool.
One alternative is to use an alternative text editor as 100% replacement for Notepad as explained here with many details. Another description with a dedicated editor launcher tool can be found here. Another Notepad++ launcher on github.
A less invasive alternative is a cmd file like this:
"C:ProgrammeNotepad++notepad++.exe" %*
This file has to reside somewhere along the existing PATH.
I actually put all my tools in one common UTIL directory, which is part of PATH.
edited Feb 2 '18 at 22:11
answered Jun 14 '13 at 14:46
Axel KemperAxel Kemper
2,67711621
2,67711621
What do you mean by "cmd file"? And what's with the asterisk and the percent sign? What file has to reside "along" the PATH? (It's not like it's going somewhere.) How do you make use of UTIL? Last time I checked there is no variable called UTIL. Is this something you came up yourself and added manually to the system? Can you explain any of this? And maybe give me some concrete example I can work with and hopefully learn from? Or are you just here to brag about how you know command line? I don't mean to be rude or anything, I'm just saying how it is. We all have different skill levels.
– Samir
Jun 14 '13 at 15:33
2
A cmd file could be the text script file npp.cmd which has the command as single text line inside. If you create a directory c:util and put the script file into it, extend your PATH by c:util, you from then on can call Notepad++ by typing "npp". %* stands for "all commandline arguments".
– Axel Kemper
Jun 14 '13 at 17:41
1
A cmd file is often called a "batch file". In the days of MS-DOS, the extension was always.BATbut these days it is often.cmd. The commands in the file are executed bycmd.exewhich is the command-line shell itself.
– steveha
Oct 23 '13 at 7:04
Please note that in PowerShell the syntax for updating the PATH Environment Variable is a little different stackoverflow.com/a/1333717/47226
– Aaron Hoffman
Jun 28 '15 at 16:00
1
It looks like your link to the article on how to replace Notepad is broken already.
– RobH
Feb 2 '18 at 21:38
|
show 4 more comments
What do you mean by "cmd file"? And what's with the asterisk and the percent sign? What file has to reside "along" the PATH? (It's not like it's going somewhere.) How do you make use of UTIL? Last time I checked there is no variable called UTIL. Is this something you came up yourself and added manually to the system? Can you explain any of this? And maybe give me some concrete example I can work with and hopefully learn from? Or are you just here to brag about how you know command line? I don't mean to be rude or anything, I'm just saying how it is. We all have different skill levels.
– Samir
Jun 14 '13 at 15:33
2
A cmd file could be the text script file npp.cmd which has the command as single text line inside. If you create a directory c:util and put the script file into it, extend your PATH by c:util, you from then on can call Notepad++ by typing "npp". %* stands for "all commandline arguments".
– Axel Kemper
Jun 14 '13 at 17:41
1
A cmd file is often called a "batch file". In the days of MS-DOS, the extension was always.BATbut these days it is often.cmd. The commands in the file are executed bycmd.exewhich is the command-line shell itself.
– steveha
Oct 23 '13 at 7:04
Please note that in PowerShell the syntax for updating the PATH Environment Variable is a little different stackoverflow.com/a/1333717/47226
– Aaron Hoffman
Jun 28 '15 at 16:00
1
It looks like your link to the article on how to replace Notepad is broken already.
– RobH
Feb 2 '18 at 21:38
What do you mean by "cmd file"? And what's with the asterisk and the percent sign? What file has to reside "along" the PATH? (It's not like it's going somewhere.) How do you make use of UTIL? Last time I checked there is no variable called UTIL. Is this something you came up yourself and added manually to the system? Can you explain any of this? And maybe give me some concrete example I can work with and hopefully learn from? Or are you just here to brag about how you know command line? I don't mean to be rude or anything, I'm just saying how it is. We all have different skill levels.
– Samir
Jun 14 '13 at 15:33
What do you mean by "cmd file"? And what's with the asterisk and the percent sign? What file has to reside "along" the PATH? (It's not like it's going somewhere.) How do you make use of UTIL? Last time I checked there is no variable called UTIL. Is this something you came up yourself and added manually to the system? Can you explain any of this? And maybe give me some concrete example I can work with and hopefully learn from? Or are you just here to brag about how you know command line? I don't mean to be rude or anything, I'm just saying how it is. We all have different skill levels.
– Samir
Jun 14 '13 at 15:33
2
2
A cmd file could be the text script file npp.cmd which has the command as single text line inside. If you create a directory c:util and put the script file into it, extend your PATH by c:util, you from then on can call Notepad++ by typing "npp". %* stands for "all commandline arguments".
– Axel Kemper
Jun 14 '13 at 17:41
A cmd file could be the text script file npp.cmd which has the command as single text line inside. If you create a directory c:util and put the script file into it, extend your PATH by c:util, you from then on can call Notepad++ by typing "npp". %* stands for "all commandline arguments".
– Axel Kemper
Jun 14 '13 at 17:41
1
1
A cmd file is often called a "batch file". In the days of MS-DOS, the extension was always
.BAT but these days it is often .cmd. The commands in the file are executed by cmd.exe which is the command-line shell itself.– steveha
Oct 23 '13 at 7:04
A cmd file is often called a "batch file". In the days of MS-DOS, the extension was always
.BAT but these days it is often .cmd. The commands in the file are executed by cmd.exe which is the command-line shell itself.– steveha
Oct 23 '13 at 7:04
Please note that in PowerShell the syntax for updating the PATH Environment Variable is a little different stackoverflow.com/a/1333717/47226
– Aaron Hoffman
Jun 28 '15 at 16:00
Please note that in PowerShell the syntax for updating the PATH Environment Variable is a little different stackoverflow.com/a/1333717/47226
– Aaron Hoffman
Jun 28 '15 at 16:00
1
1
It looks like your link to the article on how to replace Notepad is broken already.
– RobH
Feb 2 '18 at 21:38
It looks like your link to the article on how to replace Notepad is broken already.
– RobH
Feb 2 '18 at 21:38
|
show 4 more comments
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.
Using start "" to prefix the command here prevents locking up the command prompt if a notepad++.exe is not already running.
– Jeremy Murray
Nov 6 '18 at 21:26
add a comment |
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.
Using start "" to prefix the command here prevents locking up the command prompt if a notepad++.exe is not already running.
– Jeremy Murray
Nov 6 '18 at 21:26
add a comment |
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.
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.
answered Mar 2 '16 at 3:27
Nayana AdassuriyaNayana Adassuriya
18826
18826
Using start "" to prefix the command here prevents locking up the command prompt if a notepad++.exe is not already running.
– Jeremy Murray
Nov 6 '18 at 21:26
add a comment |
Using start "" to prefix the command here prevents locking up the command prompt if a notepad++.exe is not already running.
– Jeremy Murray
Nov 6 '18 at 21:26
Using start "" to prefix the command here prevents locking up the command prompt if a notepad++.exe is not already running.
– Jeremy Murray
Nov 6 '18 at 21:26
Using start "" to prefix the command here prevents locking up the command prompt if a notepad++.exe is not already running.
– Jeremy Murray
Nov 6 '18 at 21:26
add a comment |
Combining the answers from Axel Kemper and adding some extra's, here is what I did to make a permanent command that you can give any name you want.
First of all I created an extra folder. In my case: "C:UsersHanselCmdFiles". In this folder I created a new text file throught the right click menu -> new -> text document. Edit the text document using notepad or notepad++ and type the following code in the .txt file:
@echo off
"C:SoftwareNotepad++notepad++.exe" %*
Then you have to rename the file to your personal command, for example "npp.cmd".
On a side note: the @echo off prevents the command from printing to
the command prompt;
the link between the quotation marks can refer to any executable;
*%** will make sure that anything you type after the
npp command (for example "npp nonsense.txt") will be put after the original command in the quotation marks.
Then you need to edit an "environment variable", in this case the so called PATH (this variable contains the folders where Windows looks for commands and executables). To add the folder to your PATH, push the windows button to enter the start menu and type "edit environment variables for your account". Under "User variables for Hansel", create a new "Path" variable if it does not exist or edit the old "Path" variable if there is one.
If you make a new PATH variable, the variable value should just read: C:UsersHansCmdFiles
If you edit an old PATH variable, the variable value should read: oldstuff;C:UsersHansCmdFiles (mind the semi colon).
Windows now looks for commands in the folder "C:UsersHanselCmdFiles" and you can easily add new commands to this folder!
8
You don't need@ECHO OFFfor a one-line command. The@suppresses echo for that line alone, so@"C:SoftwareNotepad++notepad++.exe" %*does what you want.
– Clement Cherlin
Apr 15 '15 at 17:16
add a comment |
Combining the answers from Axel Kemper and adding some extra's, here is what I did to make a permanent command that you can give any name you want.
First of all I created an extra folder. In my case: "C:UsersHanselCmdFiles". In this folder I created a new text file throught the right click menu -> new -> text document. Edit the text document using notepad or notepad++ and type the following code in the .txt file:
@echo off
"C:SoftwareNotepad++notepad++.exe" %*
Then you have to rename the file to your personal command, for example "npp.cmd".
On a side note: the @echo off prevents the command from printing to
the command prompt;
the link between the quotation marks can refer to any executable;
*%** will make sure that anything you type after the
npp command (for example "npp nonsense.txt") will be put after the original command in the quotation marks.
Then you need to edit an "environment variable", in this case the so called PATH (this variable contains the folders where Windows looks for commands and executables). To add the folder to your PATH, push the windows button to enter the start menu and type "edit environment variables for your account". Under "User variables for Hansel", create a new "Path" variable if it does not exist or edit the old "Path" variable if there is one.
If you make a new PATH variable, the variable value should just read: C:UsersHansCmdFiles
If you edit an old PATH variable, the variable value should read: oldstuff;C:UsersHansCmdFiles (mind the semi colon).
Windows now looks for commands in the folder "C:UsersHanselCmdFiles" and you can easily add new commands to this folder!
8
You don't need@ECHO OFFfor a one-line command. The@suppresses echo for that line alone, so@"C:SoftwareNotepad++notepad++.exe" %*does what you want.
– Clement Cherlin
Apr 15 '15 at 17:16
add a comment |
Combining the answers from Axel Kemper and adding some extra's, here is what I did to make a permanent command that you can give any name you want.
First of all I created an extra folder. In my case: "C:UsersHanselCmdFiles". In this folder I created a new text file throught the right click menu -> new -> text document. Edit the text document using notepad or notepad++ and type the following code in the .txt file:
@echo off
"C:SoftwareNotepad++notepad++.exe" %*
Then you have to rename the file to your personal command, for example "npp.cmd".
On a side note: the @echo off prevents the command from printing to
the command prompt;
the link between the quotation marks can refer to any executable;
*%** will make sure that anything you type after the
npp command (for example "npp nonsense.txt") will be put after the original command in the quotation marks.
Then you need to edit an "environment variable", in this case the so called PATH (this variable contains the folders where Windows looks for commands and executables). To add the folder to your PATH, push the windows button to enter the start menu and type "edit environment variables for your account". Under "User variables for Hansel", create a new "Path" variable if it does not exist or edit the old "Path" variable if there is one.
If you make a new PATH variable, the variable value should just read: C:UsersHansCmdFiles
If you edit an old PATH variable, the variable value should read: oldstuff;C:UsersHansCmdFiles (mind the semi colon).
Windows now looks for commands in the folder "C:UsersHanselCmdFiles" and you can easily add new commands to this folder!
Combining the answers from Axel Kemper and adding some extra's, here is what I did to make a permanent command that you can give any name you want.
First of all I created an extra folder. In my case: "C:UsersHanselCmdFiles". In this folder I created a new text file throught the right click menu -> new -> text document. Edit the text document using notepad or notepad++ and type the following code in the .txt file:
@echo off
"C:SoftwareNotepad++notepad++.exe" %*
Then you have to rename the file to your personal command, for example "npp.cmd".
On a side note: the @echo off prevents the command from printing to
the command prompt;
the link between the quotation marks can refer to any executable;
*%** will make sure that anything you type after the
npp command (for example "npp nonsense.txt") will be put after the original command in the quotation marks.
Then you need to edit an "environment variable", in this case the so called PATH (this variable contains the folders where Windows looks for commands and executables). To add the folder to your PATH, push the windows button to enter the start menu and type "edit environment variables for your account". Under "User variables for Hansel", create a new "Path" variable if it does not exist or edit the old "Path" variable if there is one.
If you make a new PATH variable, the variable value should just read: C:UsersHansCmdFiles
If you edit an old PATH variable, the variable value should read: oldstuff;C:UsersHansCmdFiles (mind the semi colon).
Windows now looks for commands in the folder "C:UsersHanselCmdFiles" and you can easily add new commands to this folder!
edited Jan 23 at 14:08
Thorbjørn Ravn Andersen
3391317
3391317
answered Aug 25 '14 at 22:40
HanselHansel
9412
9412
8
You don't need@ECHO OFFfor a one-line command. The@suppresses echo for that line alone, so@"C:SoftwareNotepad++notepad++.exe" %*does what you want.
– Clement Cherlin
Apr 15 '15 at 17:16
add a comment |
8
You don't need@ECHO OFFfor a one-line command. The@suppresses echo for that line alone, so@"C:SoftwareNotepad++notepad++.exe" %*does what you want.
– Clement Cherlin
Apr 15 '15 at 17:16
8
8
You don't need
@ECHO OFF for a one-line command. The @ suppresses echo for that line alone, so @"C:SoftwareNotepad++notepad++.exe" %* does what you want.– Clement Cherlin
Apr 15 '15 at 17:16
You don't need
@ECHO OFF for a one-line command. The @ suppresses echo for that line alone, so @"C:SoftwareNotepad++notepad++.exe" %* does what you want.– Clement Cherlin
Apr 15 '15 at 17:16
add a comment |
A simple way to run any program installed on Windows from command is:
Find the location of notepad++.exe, create a shortcut under the installation directory.
cut and paste the shortcut to C:/windows/system 32.
Now you can press 'Win + R' and type the name of shortcut. All done.
PS: in my case, I named the shortcut 'notepadpp' (or even 'nppp') so that I don't have to press 'shift + =' twice for '+' symbol
Extremely simple and easy, and it's easy to delete the shortcut. You don't even need to change the path, registry
add a comment |
A simple way to run any program installed on Windows from command is:
Find the location of notepad++.exe, create a shortcut under the installation directory.
cut and paste the shortcut to C:/windows/system 32.
Now you can press 'Win + R' and type the name of shortcut. All done.
PS: in my case, I named the shortcut 'notepadpp' (or even 'nppp') so that I don't have to press 'shift + =' twice for '+' symbol
Extremely simple and easy, and it's easy to delete the shortcut. You don't even need to change the path, registry
add a comment |
A simple way to run any program installed on Windows from command is:
Find the location of notepad++.exe, create a shortcut under the installation directory.
cut and paste the shortcut to C:/windows/system 32.
Now you can press 'Win + R' and type the name of shortcut. All done.
PS: in my case, I named the shortcut 'notepadpp' (or even 'nppp') so that I don't have to press 'shift + =' twice for '+' symbol
Extremely simple and easy, and it's easy to delete the shortcut. You don't even need to change the path, registry
A simple way to run any program installed on Windows from command is:
Find the location of notepad++.exe, create a shortcut under the installation directory.
cut and paste the shortcut to C:/windows/system 32.
Now you can press 'Win + R' and type the name of shortcut. All done.
PS: in my case, I named the shortcut 'notepadpp' (or even 'nppp') so that I don't have to press 'shift + =' twice for '+' symbol
Extremely simple and easy, and it's easy to delete the shortcut. You don't even need to change the path, registry
answered Dec 24 '17 at 7:58
A kindheart Internet userA kindheart Internet user
311
311
add a comment |
add a comment |
One way is to make a change to this registry key:
[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionApp PathsNotepad++.exe]
You can download a zipped .reg file from Donn Felker that lets you open a file with just an n shortcut.
I edited the .reg before running it and to make sure the path to Notepad++ is correct (e.g. C:Program Files (x86)) and I also changed the shortcut to n instead of n.
Then double click to add to your registry.
add a comment |
One way is to make a change to this registry key:
[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionApp PathsNotepad++.exe]
You can download a zipped .reg file from Donn Felker that lets you open a file with just an n shortcut.
I edited the .reg before running it and to make sure the path to Notepad++ is correct (e.g. C:Program Files (x86)) and I also changed the shortcut to n instead of n.
Then double click to add to your registry.
add a comment |
One way is to make a change to this registry key:
[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionApp PathsNotepad++.exe]
You can download a zipped .reg file from Donn Felker that lets you open a file with just an n shortcut.
I edited the .reg before running it and to make sure the path to Notepad++ is correct (e.g. C:Program Files (x86)) and I also changed the shortcut to n instead of n.
Then double click to add to your registry.
One way is to make a change to this registry key:
[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionApp PathsNotepad++.exe]
You can download a zipped .reg file from Donn Felker that lets you open a file with just an n shortcut.
I edited the .reg before running it and to make sure the path to Notepad++ is correct (e.g. C:Program Files (x86)) and I also changed the shortcut to n instead of n.
Then double click to add to your registry.
answered Jan 10 '14 at 8:48
HugoHugo
2,41011621
2,41011621
add a comment |
add a comment |
To run any program from command line with a short name you can create an alias for it by the command doskey:
doskey alias="drive:path to programexecutable" $*
For example, after running commanddoskey notepad++="C:Program Files (x86)Notepad++notepad++.exe" $*
you can open the text file with notepad++ by notepad++ textfile. Of course, you can use shorter alias something as npp or n++.
Also you can create alias for some path you often open:
doskey home=cd C:Usersmyprofile
But unfortunately you cannot use this alias in path. If you run doskey home=C:Usersmyprofile and then enter in the command line cd home or start homemyfile you receive error message.
To create your aliases automatically each time when cmd runs you can put its into the batch file like autorun.cmd and set it in the registry entry:
HKCUSoftwareMicrosoftCommand ProcessorAutoRun
or
HKLMSoftwareMicrosoftCommand ProcessorAutoRun
Links to the articles:
Console Aliases
Command ProcessorAutoRun
add a comment |
To run any program from command line with a short name you can create an alias for it by the command doskey:
doskey alias="drive:path to programexecutable" $*
For example, after running commanddoskey notepad++="C:Program Files (x86)Notepad++notepad++.exe" $*
you can open the text file with notepad++ by notepad++ textfile. Of course, you can use shorter alias something as npp or n++.
Also you can create alias for some path you often open:
doskey home=cd C:Usersmyprofile
But unfortunately you cannot use this alias in path. If you run doskey home=C:Usersmyprofile and then enter in the command line cd home or start homemyfile you receive error message.
To create your aliases automatically each time when cmd runs you can put its into the batch file like autorun.cmd and set it in the registry entry:
HKCUSoftwareMicrosoftCommand ProcessorAutoRun
or
HKLMSoftwareMicrosoftCommand ProcessorAutoRun
Links to the articles:
Console Aliases
Command ProcessorAutoRun
add a comment |
To run any program from command line with a short name you can create an alias for it by the command doskey:
doskey alias="drive:path to programexecutable" $*
For example, after running commanddoskey notepad++="C:Program Files (x86)Notepad++notepad++.exe" $*
you can open the text file with notepad++ by notepad++ textfile. Of course, you can use shorter alias something as npp or n++.
Also you can create alias for some path you often open:
doskey home=cd C:Usersmyprofile
But unfortunately you cannot use this alias in path. If you run doskey home=C:Usersmyprofile and then enter in the command line cd home or start homemyfile you receive error message.
To create your aliases automatically each time when cmd runs you can put its into the batch file like autorun.cmd and set it in the registry entry:
HKCUSoftwareMicrosoftCommand ProcessorAutoRun
or
HKLMSoftwareMicrosoftCommand ProcessorAutoRun
Links to the articles:
Console Aliases
Command ProcessorAutoRun
To run any program from command line with a short name you can create an alias for it by the command doskey:
doskey alias="drive:path to programexecutable" $*
For example, after running commanddoskey notepad++="C:Program Files (x86)Notepad++notepad++.exe" $*
you can open the text file with notepad++ by notepad++ textfile. Of course, you can use shorter alias something as npp or n++.
Also you can create alias for some path you often open:
doskey home=cd C:Usersmyprofile
But unfortunately you cannot use this alias in path. If you run doskey home=C:Usersmyprofile and then enter in the command line cd home or start homemyfile you receive error message.
To create your aliases automatically each time when cmd runs you can put its into the batch file like autorun.cmd and set it in the registry entry:
HKCUSoftwareMicrosoftCommand ProcessorAutoRun
or
HKLMSoftwareMicrosoftCommand ProcessorAutoRun
Links to the articles:
Console Aliases
Command ProcessorAutoRun
answered Apr 2 '16 at 4:27
Paola CaptanovskaPaola Captanovska
413
413
add a comment |
add a comment |
Add the program directory to your PATH.
add a comment |
Add the program directory to your PATH.
add a comment |
Add the program directory to your PATH.
Add the program directory to your PATH.
answered Jun 13 '13 at 21:11
OesorOesor
2951210
2951210
add a comment |
add a comment |
protected by Community♦ Apr 3 '18 at 13:07
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
1
In Windows Vista, Windows 7, 8you can you can use start menu search box like run command. No need to press Win+R. Press Win and type in search box. Try it!
– Kamil
Aug 26 '14 at 0:25
(Not enough rep to answer). If you want to open a file whose extension is associated to NotePad++, just type the full filename:
d:mytext.txtand it will be open in the default app. You cannot pass CL arguments, but quick enough if you just want to open the file– cbuchart
Nov 19 '18 at 11:30