title: Exclude specific file extension
body: <p>Alright, I'm new to scripting and I'm trying to edit a batch script file that sends an email when a file with an extension of .ecl is in a folder longer than 5 min or so. But there are other files with a .ecl.part extension that get flagged and it sends an email instead of the .ecl files.  I'm curious if there is something I can add so that it will send an email when there are .ecl files in the folder for more than 5 min and ignore the .ecl.part files. I read one for someone with Linux who used [!(.extension to exclude)].extension not to exclude, I'm just wondering if this will work for my windows batch script. If it will work do I add it just like that or do I add it like this .extension not to exclude[!(.extension to exclude)]</p>
  
  <p>Here is the part of the script in question:</p>
  
  <pre><code>     for /f "tokens=1-5 delims=:, " %%a in ('forfiles /p z: /d +0 /s /m *.ecl /c "cmd /c if @isdir==FALSE echo @file,@ftime"') do (
       set  fnam=%%a
       set   fhr=%%b
       set  fmin=%%c
       set  fsec=%%d
       set fampm=%%e
  
       if "!fampm!" == "PM" if "!fhr!" neq "12" (set /a "fhr=!fhr!+12")
  </code></pre>
  
  <p>There is more of the script, I didn't set this up, and the person who did isn't being very helpful which is why I came here.</p>