def firstPath = "C:\\carrefour-infraws2" def secondPath = "C:\\carrefour-infraws" def firstPathFile = new File(firstPath) def secondPathFile = new File(secondPath) def corresp = [ (-1): " + new ", (0): " ", (+1): " + old "] firstPathFile.eachFileRecurse { file -> def absolutePath = file.absolutePath if (!absolutePath.contains("CVS")) { if (!file.isDirectory()) { def lastModified = new Date(file.lastModified()) def secondFile = new File(secondPath + absolutePath[firstPath.size()..-1]) println "${corresp[secondFile.lastModified() <=> file.lastModified()]} \t $absolutePath" } else { println "\n=== $absolutePath ==============================" } } }