Skip to content

Instantly share code, notes, and snippets.

@dgouyette
Created July 6, 2011 13:51
Show Gist options
  • Save dgouyette/1067270 to your computer and use it in GitHub Desktop.
Save dgouyette/1067270 to your computer and use it in GitHub Desktop.
Search inside properties if value file exists
new File("D://myPath/").eachDirRecurse() { dir ->
dir.eachFileMatch(~/.*.properties/) { file ->
file.eachLine{ln ->
if ( ln =~/\.bat$/) {
path = ln.split("=")[1]
if (path.startsWith("D:/")){
if (!new File(path).exists()){
println file.path+" => "+ ln
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment