title: Specific File Size Check with batch file
body: <p>I would appreciate if someone could help me with following script.  Actually, I am trying to write a batch file that searches for AVI files and check if it is more than 200 MB restrict the file by using cacls or del the same.  I'm new to batch files and I am trying hard to get this done.  Please help me.</p>
  
  <p>Thanks in advance.</p>
  
  <pre><code>@ECHO OFF
  SET FILETYPE=*.mp3
  SET SIZELIMIT=7,425,794
  for /R d:\ %I IN ('%FILETYPE%') do set FILESIZE=%~xI
  if %FILESIZE% GTR %SIZELIMIT% ( del %SIZELIMIT% ) ELSE ( echo.file not found )
  </code></pre>
  
  <p>Shad</p>