Many thanks for your help.
I will consider the processx package.
Best regards
Nicolas
Le 17 août 2024 à 16:07, Ivan Krylov a écrit :
В Sat, 17 Aug 2024 11: 47: 30 + SIMON Nicolas via R-help пишет: > nmrun <- paste0("cmd. exe /k ",nm_log,". bat ",nmi,".
ctl ",nmi,". lst") You are using
В Sat, 17 Aug 2024 11:47:30 +
SIMON Nicolas via R-help пишет:
> nmrun <- paste0("cmd.exe /k ",nm_log,".bat ",nmi,".ctl ",nmi,".lst")
You are using the /k option that instructs cmd.exe to keep the command
prompt open. Does the batch file contain an explicit "exit" to ensure
that cmd.exe termi
I execute a program using a batch file from R.
The program may have infinite computation. So I need to be avle to stop it.
nm_log <- "c:/nm74g64/run/nmfe74"
nmi<- "202"
nmrun <- paste0("cmd.exe /k ",nm_log,".bat ",nmi,".ctl ",nmi,".lst")
# run
system(nmrun, invisible = F, show.output.on.consol
cmd
taskkill /PID 1234
Will kill process 1234 if you know it id
So shell.exec can likely do this for you
On Sat, 17 Aug 2024, 12:31 Duncan Murdoch, wrote:
> On 2024-08-17 6:21 a.m., SIMON Nicolas via R-help wrote:
> > I would like to stop a dos shell windows following the cmd (execute)
> comma
On 2024-08-17 6:21 a.m., SIMON Nicolas via R-help wrote:
I would like to stop a dos shell windows following the cmd (execute) command.
Is there a way to do that from R?
I think you need to give more detail on what you are trying to do. In
Windows, "cmd" is supposed to open a shell window.
I would like to stop a dos shell windows following the cmd (execute) command.
Is there a way to do that from R?
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
6 matches
Mail list logo