Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can someone tell me how to run a batch file from Notepad++

Tags:

notepad++

I thought I could run a batch file from Notepad++ directly using nppexec by (or the built in run command) by typing CMD $(FULL_CURRENT_PATH)

But since notepad++ HAS a CMD command (which open the cmd shell in the npp console) then it is not working. So running the above command opens cmd shell in the npp console but does not run the batch file. At that point I can run $(FULL_CURRENT_PATH) AND it will run the batch file. But then I have to type exit to get our of command shell mode.

Can someone tell me how to run the batch file I am current editing in npp directly in npp.

like image 763
Seth Spearman Avatar asked Nov 16 '10 16:11

Seth Spearman


People also ask

How do I run a batch file in Notepad?

To open the BAT file in Notepad, right-click it and choose Show more options > Edit from the menu (or just Edit in some Windows versions). You might find it helpful to use more advanced text editors that support syntax highlighting when editing a BAT file.

How do I execute a batch file?

To run a batch file, move to the directory containing the file and type the name of the batch file. For example, if the batch file is named "hope. bat," you'd type "hope" to execute the batch file.

How do I run a batch file from anywhere?

bat from anywhere on the command line. Show activity on this post. Create a folder called Batches (lets say in your C drive). Append C:\Batches in your path environment variable and you then can run batch files in that directory from anywhere.


2 Answers

cmd /c "$(FULL_CURRENT_PATH)" 

:)

like image 174
Ben Avatar answered Oct 02 '22 17:10

Ben


With RunMe plugin you can do this. It can change current directory to the file path before open the file and Ben's solution doesn't do this. ;)

like image 20
Greck Avatar answered Oct 02 '22 15:10

Greck