title: Groovy delete specific file from the list
body: <p>I try to delete files which i can find in <code>folderPath</code>. But I want delete only that, which have in name "Jenkins".<br>
  How to define in list to delete only that file.?</p>
  
  <p>Example :<br>
  In C:\test\test have 3 files, want delete that which have Jenkins in name :</p>
  
  <p><a href="https://i.stack.imgur.com/Oo7Np.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Oo7Np.png" alt="Files"></a></p>
  
  <pre><code>import groovy.io.FileType
  
  String folderPath = "C:\\test" + "\\" + "test"
  def list = []
  def dir = new File("$folderPath")
  dir.eachFileRecurse (FileType.FILES) { file -&gt;
    list &lt;&lt; file
  }
  list.each {
  println it.findAll() == "Jenkins" // Just files witch include in list "Jenkins" name
  }
  </code></pre>
  
  <p>Thanks for tips !</p>