title: How does a Windows batch file detect that a file is > 0 bytes?
body: <p>I have a Windows batch file utilized in my Visual Studio tool chain that creates a list of files in a particular directory, and then uses "findstr" to narrow this list down to only the files whose names contain a particular string; and then does some work on these files.</p>
  
  <pre><code>dir /b \mypath\*.wav &gt;wavRawList.txt
  
  findstr /b /v "DesiredString" wavRawList.txt &gt;wavListWithDesiredString.txt
  
  for /f %%a in (wavListWithDesiredString.txt) do (
  
    [... do some stuff ...]
  
  )
  </code></pre>
  
  <p>Visual Studio frequently reports errors from this batch file, and I think it's because wavListWithDesiredString.txt frequently ends up being a file with a length of 0.  Is there a variety of "if exist wavListWithDesiredString.txt" where instead of "exist" I can substitute a command meaning "if it exists and its file length is greater than 0"?</p>