How can I specify the actual file to process using the Run command in Notepad++. I want for example run pdflatex using the actualfile as input, or the cs compiler, etc. Using the entire path isn't practical, it must works with any actual file.
How to run CMD console commands in Notepad++ If you want to work with Notepad++ and CMD (Command Line) Console at once you can install NPPExec plugin. Once you install this plugin using Plugin Manager, go to Plugins -> NppExec -> Execute..., or press F6 key.
Right click on the text file, select properties, select permission, mark the "Let this file be executed" text box. Now you can execute it just by double clicking on the file.
You can automatically add the current file using a variable in the execution string:
C:\temp\test.exe "$(FULL_CURRENT_PATH)"
The list of available variables is documented here. Examples:
E:\My Web\main\welcome.html
E:\My Web\main
welcome.html
welcome
.html
<var>
e.g.: SYS.PATH = %PATH%
<selection or word under cursor>
<line number>
<column number>
c:\Program Files\notepad++
c:\Program Files\notepad++\notepad++.exe
You can also see the source code at RunDlg.cpp line 77 and line 26
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With