title: Batch Script to copy latest file from Folder
body: <p>I want to copy the latest file from a Folder(and subfolders) to a new location.
  The following code works well, BUT I do not want to filter by Date AND Time (/O:D), but DATE only, so that all files from the same date will be copied to the new location as the latest files.</p>
  
  <pre><code>FOR /F "delims=|" %%I IN ('DIR "D:\Backups\DB\*.bak" /B /O:D /S') DO SET NewestFile=%%I
  copy "%NewestFile%" "D:\Latest"
  </code></pre>