Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Extract iso file using Groovy to a specific path

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

1 answer

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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Jira Software

Presenting the "Best of 2020" Jira Software roundup!

Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...

7,071 views 8 28
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you