Hello,
I have a script that gets files from a path. (this script works perfectly)
I would like to extract the iso fiels to a path I need to give the script.
Is it possible? and how?
This is my script:
def list = []
//get iso files
def dir = new File("xxxx/xxx/xxxx/xxxx"+issue.getSummary()+"/yyyy/yyyy")
dir.eachFileRecurse (FileType.FILES) { file ->
list << file
}
for(def i=0;i<list.size();i++)
{
boolean flag=true;
def z=list[i].toString().length();
def counter=0;
while(list[i].toString()[z-1]!='/')
{
counter++;
z--;
}
def summary = list[i].toString().substring(list[i].toString().length()-counter,list[i].toString().length());
log.warn summary;
//file inside ends with iso
if(summary.toString().endsWith("iso"))
{
EXTRACT THE ISO FILE TO SPECIFIC PATH
}
Thank you
Hi @Dan27,
You can find most of the code to extract an ISO file at Exploring the ISO File Format in JavaScript, which should be highly compatible with Groovy.
OR
You can design your Groovy script to execute OS-level commands:
I hope that this helps.
Thanks,
Moga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.