title: Batch Script To Delete Files Within a Directory After A Certain Count Value
body: <p>I am currently looking to implement a small script to browse through a directory and delete all files/folders after a certain count value in this case ill use 3</p>
  
  <p>This is an example of what i'm trying to achieve</p>
  
  <p>c:/test Contains</p>
  
  <ol>
  <li>file1.bak</li>
  <li>file2.bak</li>
  <li>file3.bak</li>
  <li>file4.bak (delete)</li>
  <li>file5.bak (delete)</li>
  <li>file6.bak (delete)</li>
  </ol>
  
  <p>I am not very familiar with batch scripting but believe the process will require 
  a for iteration that adds 1 to a count variable for every file (of any type) in the directory and when the count reaches 3 it will begin to delete files after that point. Could someone please assist I can write the base process in Java but am slightly unfamiliar with batch scripting. Could someone please assist?</p>
  
  <p>Thanks</p>