In the code provided below I can print each of the file names in the directory, but when it reaches the Exec command it only performs an Exec on the last file.
task frmf2xml(type:Exec) {
new File('src/orca/').eachFile {file ->
if(file.name.endsWith(".fmb")){
println file
commandLine 'cmd', '/c', 'frmf2xml.bat', file, 'OVERWRITE=YES'
}
}
}
I would like it to run the tool on every file