title: Gradle: Check a file exist without file name
body: <p>I need to copy a file from one location to another location using gradle and stop further processing if the file is not in the destination. But I don't have the exact file name. I have to use the format of the file to check like<b> *.war or *.jar.</b> But assert is not working on <b> path/*.war </b> but if I give "path/name.war" then it is working. Any idea how to do assert for "path/*.war"</p>
  
  <pre><code>from fileTree( "target" ), {
          include "*.war"
          into '/usr/share/bin/web/'
      }
  &lt;code&gt;
  assert file("/usr/share/bin/web/\*.war").exists();  --&gt; not working
  assert file("/usr/share/bin/web/\name.war").exists();  --&gt; working
  </code></pre>