How do I get "FINDSTR" find a value between a specified range ? I set the "string": "20141001" and "20141030" . If within the *.TXT file exists "20141017", should return the "ERRORLEVEL" = 0.
EXEMPLE:
@echo off
SET DATE_STA=20141001
SET DATE_END=20141030
echo Looking for all the files in the folder
echo within the range from %DATE_STA% to %DATA_END% ...
echo.
:FINDING
findstr /r "%DATE_STA% to %DATA_END%" C:\Folder\*.txt
IF %ERRORLEVEL%==0 (
goto OKAY) else (
goto FAIL
)
:OKAY
cls
echo.
echo Located file that contains a value in the specified range.
echo.
pause
exit
:FAIL
cls
echo.
echo Any file located in this folder..
echo.
pause
exit