I'm trying to compare two files. They should be the same except for the firs 5 characters. I need the error file to contain the line(s) that do not match. Is there a way to limit the findstr command to only look at the characters at position 6 and beyond?
@echo off
echo Start %date% %time%
REM Verify that File1.txt and File2.txt are identical except for the first 5 characters
findstr /vio File1.txt File2.txt > Berror.txt
echo End %date% %time%
Berror.txt
Pause
File1.txt
00000spider
00000center
00000earwax
00000horn
00000cup
00000ton
00000ankle
00000foster
00000restaurant
00000ecstasy
File2.txt
46884spider
12464center
31197earwax
32514horn
64856cup
61465ton
91468anklet
31515foster
91580restaurant
41623ecstasy
I've tried using /r with [6-20] but I can't find an example with the sytax so I don't really know how to use it. The output I am expecting is line 7: 91468anklet and 00000ankle since that is the only line with a difference in this example.
Output: