title: How do I Detect (and Delete) a File if it is Empty using a Windows Batch File?
body: <p>How do I detect if a file is empty using a Windows batch file? I want to delete error logs if they are empty.</p>
  <p>I am aware for for loop solutions such as <a href="https://web.archive.org/web/20171110203759/http://anderwald.info/scripting/windows-batch-delete-all-empty-files-in-a-specified-folder/" rel="nofollow noreferrer">https://web.archive.org/web/20171110203759/http://anderwald.info/scripting/windows-batch-delete-all-empty-files-in-a-specified-folder/</a> but I was wondering if there was a more elegant solution if you know the specific single file in question that needs to be tested, as I may not wish to delete other zero byte files in the folder.</p>