Hi, new to JIRA here.
I want to execute .bat file from local disk, as postfuction( 'run script' script runner)
please suggest if i can execute .bat file?
tried this: def proc = "c:\\users\\40013750\\test.bat".execute();
failed:
g.codehaus.groovy.runtime.InvokerInvocationException: java.io.IOException: Cannot run program "c:\users\40013750\test.bat": error=2, No such file or directory at ConsoleScriptExecution1_groovyProxy.run(Unknown Source) Caused by: java.io.IOException: Cannot run program "c:\users\40013750\test.bat": error=2, No such file or directory at Script1.run(Script1.groovy:1) at Script1$run.call(Unknown Source) at Script1$run.call(Unknown Source) at com.adaptavist.sr.cloud.workflow.AbstractScript.evaluate(AbstractScript.groovy:33) at com.adaptavist.sr.cloud.events.ScriptExecution.run(ScriptExecution.groovy:29) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at ConsoleScriptExecution1_groovyProxy.run(Unknown Source) at com.adaptavist.sr.cloud.MainHandler.executeScript(MainHandler.groovy:388) at com.adaptavist.sr.cloud.MainHandler.processInput(MainHandler.groovy:334) at com.adaptavist.sr.cloud.MainHandler.access$0(MainHandler.groovy) at com.adaptavist.sr.cloud.MainHandler$_handleRequest_closure1.doCall(MainHandler.groovy:154) at com.adaptavist.sr.cloud.MainHandler$_handleRequest_closure1.call(MainHandler.groovy) Caused by: java.io.IOException: error=2, No such file or directory ... 14 more
I think you need to use the following format
def urbatname = new File(c:\\users\\40013750\\test.bat).absolutePath
below you can find more detail about the fix
Thank you!, But it's given the path of file, but did not open .bat from cmd...
is there something that i need to do to integrate between cmd and jira to execute this .bat file (before this line - def urbatname = new File(c:\\users\\40013750\\test.bat).absolutePath )?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.