How to FINDSTR seek an occurrence within a numerical range specified in all TXT in the directory?
问题 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