title: Comparing files in two folders using batch script
body: <p>I have to compare the file in two folders which have file names like</p>
  
  <p>folderA: [a.f90, b.f90, ...]
  folderB: [a_recoded.f90, b_recoded.f90, ...]</p>
  
  <p>I wish to compare a.f90 in folderA with a_recoded.f90 in folderB.</p>
  
  <p>what is used is:</p>
  
  <pre><code>@echo off
  set folderA=D:\folderA
  set folderB=D:\folderARenamed
  set /a i=0
  set /a j=0
  cd %folderA%
  FOR %%f in (*.f90) DO ( set /a i+=1 &amp; for %%r in (%folderB%\*.f90) DO (set /a j+=1 &amp; if %i% EQU %j% FC %%f %% r ) )
  </code></pre>
  
  <p>It doesn't help me, can anyone help me how to do this comparsion.</p>