Scan only the range[1-254] of last octet of ip address.

@echo off
set /a i=0
set /a i+=1
echo 253.253.1.%i%
ping -n 1 -w 500 192.168.1.%i% >>Report_Buycode_IP.txt
if %i% lss 254 goto repeat

Scan the range[1-5] of last and octet of ip address.

@echo off

SET count=0
SET count2=0


ping -n 1 -w 253. 253.% count2%.%count% >> Report_Buycode_IP.txt
echo 253.253.% count2%.%count%
SET /a count=%count%+1

IF %count%==6 goto :test
IF % count2%==6 goto :end
GOTO start

SET count=0
SET /a count2=% count2%+1
GOTO start