title: BATCH Delete oldest backup file when creating a new one
body: <p>I have a question regarding deleting the oldest file after a folder gets an X amount of files with the same extension, in this case, all the files share in common the extension <code>*.bak</code>, they are small files that I create for my firefox RES, they have imprinted on the title, the date and hour of creation, and that's as far as I can go.  </p>
  
  <p>Anyways, I've stumbled across this: <a href="https://stackoverflow.com/questions/28466638/batch-script-to-delete-oldest-folder-in-a-given-folder">Batch Script to delete oldest folder in a given folder</a>. And I'm struggling to get it to work on my idea.</p>
  
  <p>The thing is that I want the batch to simply check which file is the oldest after it creates a new one using this simple line of code.  </p>
  
  <pre><code>copy /y store.json "%DROPBOX%\RES BACKUPS\store.json %date:~-4,4%-%date:~-7,2%-%date:~-10,2%_%time:~0,2%hs-%time:~3,2%min-%time:~6,2%s.bak"
  </code></pre>