title: Checking file size in a batch script
body: <p>I am trying to find the size of a file and if it is greater than 0, I want to do some stuff.
  I have this code:</p>
  
  <pre><code>set file="C:\AnalyzerCheck\loaded.txt"
  set minbytesize=0
  if exist %file% (
  FOR /F "usebackq" %A IN ('%file%') DO set size=%~zA
  if %size% GTR %minbytesize% (
      //do stuff
  ) else (
      //do stuff
  )
  </code></pre>
  
  <p>However, I am getting this ouput/error when I run the script:</p>
  
  <blockquote>
    <p>C:\AnalyzerCheck>set file=C:\AnalyzerCheck\loaded.txt</p>
    
    <p>C:\AnalyzerCheck>set minbytesize=0  </p>
    
    <p>file~zA was unexpected at this
    time.</p>
    
    <p>C:\AnalyzerCheck>FOR /F "usebackq" file~zA</p>
    
    <p>C:\AnalyzerCheck></p>
  </blockquote>
  
  <p>How do I fix this error?</p>
  
  <p>Edit:</p>
  
  <p>New error:</p>