Answer the question
In order to leave comments, you need to log in
How to remove lines of a certain length from a txt file?
There are several files with 100+k lines.
How to remove lines containing 4 or less characters from a text file.
I found functions separately, I am not able to splice the brain.
search string tyts
delete string tyts
Answer the question
In order to leave comments, you need to log in
I had to puff, but stubbornness took over =)
here is the code:
@echo off
goto :main
:choosestr
set string=%~1
set strstart=%string:~0,4%
set strend=%string:~-4%
if NOT %strstart%==%strend% echo %string%>>1.txt
goto :EOF
:main
set tpath=%tmp%/%RANDOM%%RANDOM%.tmp
type 1.txt>%tpath%
type nul>1.txt
FOR /F %%i in (%tpath%) do call :choosestr %%i
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question