Check the specified folder. If a line in a TXT file inside it is "HHHHHHH", immediately delete that file. If "HHHHHHH" appears in other lines, it can be ignored. The following code doesn't seem to solve my problem. Who is willing to help take a look? Thanks
set old=d:\test
set SRT1=HHHHHHH
for /f "delims=" %%c in ('dir /b /s /a-d "%old%\*.txt"') do (
for /f "delims=" %%d in (%%c) do (
if *%%d*==*%STR1%* del %%c))
set old=d:\test
set SRT1=HHHHHHH
for /f "delims=" %%c in ('dir /b /s /a-d "%old%\*.txt"') do (
for /f "delims=" %%d in (%%c) do (
if *%%d*==*%STR1%* del %%c))

