Search found 3 matches

by big_caballito
04 Dec 2018 13:04
Forum: DOS Batch Forum
Topic: Remove characters from text file
Replies: 4
Views: 2078

Re: Remove characters from text file

Thanks, you two
by big_caballito
04 Dec 2018 12:26
Forum: DOS Batch Forum
Topic: Remove characters from text file
Replies: 4
Views: 2078

Re: Remove characters from text file

I solved my own problem, here is the code:

Code: Select all

for /f "tokens=*" %%D in (example.txt) do (
	set texte=%%D
	set texte=!texte:~8!
	set texte=!texte:~0,-19!
	echo "!texte:  = !" >> temp.txt
)
type temp.txt > example.txt
del temp.txt
by big_caballito
03 Dec 2018 23:58
Forum: DOS Batch Forum
Topic: Remove characters from text file
Replies: 4
Views: 2078

Remove characters from text file

Hello, i need to remove the first 8 characters, as well as the last 20 characters of each line in a text file, regardless of what the characters are.
I'm fine with using JREPL or some other utility like that to accomplish this.