Seems, your code is incomplete, because you have to compare each file in folder1 with all files in folder2. See:
Cartesian product[
^].
In pseudo-code:
Set "PECfolder=C:\SunilKK-Latitude-E6430s\SunilKK\Software\PreciseExcelComparator\v1.1\PreciseExcelComparator_PEC"
Set "PECfile=pec.jar"
REM ... some lines were skipped
FOR /f "delims=" %%f1 IN ("%Masterfolder1%\*.xls") DO (
FOR /f "delims=" %%f2 IN ("%Masterfolder2%\*.xls") DO (
REM compare last 5 characters + ".xls" of file
IF %f1:~-9% == %f2:~-9%
call java -jar %PECfolder%\%PECFile% %f1% %f2% 0 0
)
)