Open a file with npp exec
-
I use NPP EXEC plugin to compile with arara my LaTeX file. All is ok. The final command I want to open the specific file that is created. How to open a file using npp exec command?
I tried
cmd $(CURRENT_DIRECTORY)\$(NAME_PART).pdf
but I get
Process started (PID=11388) >>> Microsoft Windows [Version 10.0.19042.804] (c) 2020 Microsoft Corporation. All rights reserved. X:\full-path\>
and is waiting for my input.
-
Maybe try
start
instead ofcmd
.
Or perhapscmd /c start
. -
Actually I missed the part about NppExec which I’m not the most familiar with. Maybe it has better ways…
-
even from the normal command line, if you typed
cmd.exe blah.pdf
, you would get the same result. (Try it, I did)The correct syntax to run a command (or a file) with
cmd.exe
iscmd /c filename
. Thus, if you runcmd /c "$(CURRENT_DIRECTORY)\$(NAME_PART).pdf"
it will launch your file association for PDF files with the special variables to define the file’s path. (Note: I also added the quotes, because $(CURRENT_DIRECTORY) can contain spaces
-
@PeterJones Teaching literature is not an advantage when you use pc that’s why sometimes I ask on communities simple questions. Is working now. Thanks a lot!