Code: Select all
:SEARCH
set /p buildPatch=Enter the build and patch level:
set /p choice=Enter the search word or phrase to find the QF:
dir /ad /b | findstr /i /c:"%buildPatch%" > "%myPath%\temp.txt"
set myTemp="%myPath%temp.txt"
explorer %CD%
setLocal EnableDelayedExpansion
for /f "tokens=1* delims= usebackq" %%a in (%myTemp%) do (
set /a n+=1
set v!n!=%%a
pushD %CD%\%%a\
for /f "tokens=* delims= " %%b in ('FINDSTR /s /i /L /M /c:"%choice%" *.txt') do (
echo %%a
)
popD
)
popD
set /p exit= Do you want to try to search again: y for yes, n for no.
IF %exit%==y (
CLS
GOTO MAIN
)
IF %exit%==n exit
Heres the finished code from just part of the script, the actual search function. I had to make 2 different ones though, due to the weird folder structure.