title: DOS Batch FOR Loop to delete Files not Containing a String
body: <p>I want to delete all the files in the current directory which do not contain the string "sample" in their name.</p>
  
  <p>for instance,</p>
  
  <pre><code>test_final_1.exe
  test_initial_1.exe
  test_sample_1.exe
  test_sample_2.exe
  </code></pre>
  
  <p>I want to delete all the files other than the ones containing <em>sample</em> in their name.</p>
  
  <pre><code>for %i in (*.*) do if not %i == "*sample*" del /f /q %i
  
  Is the use of wild card character in the if condition allowed?
  Does, (*.*) represent the current directory?
  </code></pre>
  
  <p>Thanks.</p>