Just copy strings.com to the same directory. The first line of text.txt should not be an empty line, and there can be empty lines later (which will be automatically filtered).
Mainly use the read function provided by strings to read line content and the linesize function to read the number of lines in the file.
Suppose the content of test.txt is:
x.exe
y.txt
z.com
The content of the del.bat file to be deleted is:
@echo off
rem Initialize the test.txt file
strings linesize=linesize test.txt
strings files=read test.txt,1
if %files%#==# goto end
strings linesize=add %linesize%,1
set number=0
rem Traverse each file in test.txt through a loop and delete
rem Control the number of loops with the number variable
:cycle
if %number%#==%linesize%# goto next
strings number=add %number%,1
strings files=read test.txt,%number%
if %files%#==# goto cycle
del %files% >NUL
goto cycle
:next
echo The files in the test.txt list have been deleted!
:end
rem Clear environment variables
for %%a in (linesize files number) do set %%a=