I have a batch file which searches for text within files and renames the files accordingly. The problem is that it doesn't look for exact matches:
for /f "delims=" %%a in ('findstr /m "General Ledger Summary Report" c:\Temp\*.prt') do ren "%%a" OFMREP052.prt
If the exact match isn't in the folder then any file with "General Ledger" in it will be renamed.
How can I force the batch file to search for exact matches?