Execute the Current File in its ASSOCIATED Program
-
Is there a way to execute the current file (probably save it first if not) in the associated program or any program for that matter?
It is not in the “Run” menu so maybe weird hotkey or plugin?
-
Run > Run… >
cmd /c "$(FULL_CURRENT_PATH)"You can save that command by hitting the Save button in the dialog, give it a name and an optional keyboard shortcut of your choosing.
The variable syntax for the Run menu is explained in the Configuration File
-
@peterjones said in Execute the Current File in its ASSOCIATED Program:
cmd /c “$(FULL_CURRENT_PATH)”
Thanks, that seems to work but that command would need more work (for a general solution) as a lot of commands will need the current directory to be set correctly.
In any case, I found a better solution, there is a plugin called “RunMe” (not sure where the web page is but I used “Plugins Admin” to find and install it. The plugin takes care of the current directory also and has some other niceties.
-
@dennis-bareis said in Execute the Current File in its ASSOCIATED Program:
Thanks, that seems to work but that command would need more work (for a general solution) as a lot of commands will need the current directory to be set correctly.
That’s why the version I use is actually an NppExec script (save, cd, run) rather than a saved Run command.
But glad you found something that works for you
-
Hello, @dennis-bareis, @peterjones and All,
Dennis, in order to open various text files with their default program ( Notepad for Windows OS ) you may also use the built-in N++ option
File > Open in Default ViewerOnce opened in N++, I could even opened a
PDFfile and an7z archiveby this means !-
The
PDFfile correctly opened, in myMicrosoft Edgesoftware, thanks to its built-inPDFviewer function -
The
7zarchive correctly opened in my7zFM Managerprogram
However, the
File > Open in Default Vieweroption is greyed out if you try to open any picture ! Luckily, with the @peterjones method, it correctly opens the pictures in the default picture viewer :Photos!Best Regards,
guy038
-