title: List Files That Do Not Contain String in Filename
body: <p>I have two files:</p>
  <p><code>filename-0.1.211653-tests.jar</code>
  <code>filename-0.1.211653.jar</code></p>
  <p>I'm trying to find a command that will filter out <code>filename-0.1.211653-tests.jar</code>.</p>
  <p>Searching Stack Overflow I've tried:</p>
  <ol>
  <li><code>Get-ChildItem .\*.jar | Where-Object{!(Select-String -InputObject $_ -Pattern &quot;test&quot;)}</code></li>
  <li><code>Get-ChildItem .\*.jar | where { &quot;test&quot; -notcontains $_}</code></li>
  <li><code>gci |foreach-object{if (-not (select-string -inputobject $_ -Pattern &quot;test&quot;)){$_}}</code></li>
  <li><code>dir *.jar | select BaseName | where { &quot;test&quot; -notcontains $_}</code></li>
  </ol>
  <p>I don't mean to ask a repeated question, but none of those answers worked. Can someone help?</p>