title: How to delete *.* excluding some extensions?
body: <p>I'm trying to make a batch file on Windows for deleting all the files in the current directory but excluding 4 file extensions (log, sdb, SDK, bat).</p>
  
  <p>I have tried the Forfiles command on Windows but this delete everything on my current folder (even the bat file). My command is:</p>
  
  <pre><code>@ECHO OFF
  FORFILES /M *.* /C "cmd /c IF NOT @ext=="sdb" (IF NOT @ext=="sbk" (IF NOT @ext=="log" (IF NOT @ext=="bat" DEL @FILE)))" /Q
  </code></pre>
  
  <p>How can I make it work?</p>