PLEASE HELP ME!
Posted: 31 Oct 2011 23:10
Here is my issue:
I have a batch file with many repeats of this code:
NOTE- the variable %b% is predefined as a filepath
Now, I need it to stop after each occurrence of this code, do something and go onto the next occurrence of this code. Then, at the bottom of the batch file it loops to the top. This I can do, but I can't do the stopping part.
Please help me, I really need it. (please don't think that I'm pestering this forum- just I am so bad at batch that I need lots of help
)
Thank you in advance,
Rileyh
I have a batch file with many repeats of this code:
Code: Select all
setlocal disableDelayedExpansion
set file="%b%.txt"
set "search=(randomtextstring)"
for /f "delims=" %%A in ('findstr /i /c:"%search%" %file%') do (
set "ln=%%A"
(somethingrandom)
endlocal
)
if not defined _"%ln%" (goto :error)
Now, I need it to stop after each occurrence of this code, do something and go onto the next occurrence of this code. Then, at the bottom of the batch file it loops to the top. This I can do, but I can't do the stopping part.
Please help me, I really need it. (please don't think that I'm pestering this forum- just I am so bad at batch that I need lots of help

Thank you in advance,
Rileyh