delete first three characters from each line

November 3, 2009 at 04:10:11
Specs: Windows XP
I am trying to write a batch file that will delete the first three characters from every line of a text file with no success. I am a newbie to this, any help would be appreciated.

See More: delete first three characters from each line

Report •


#1
November 3, 2009 at 04:44:16
@echo off > newfile & setLocal enableDELAYedexpansion

for /f "tokens=* delims= " %%a in (myfile) do (
set s=%%a
set s=!s:~3!
>> newfile echo.!s!
)


=====================================
Helping others achieve escape felicity

M2


Report •

#2
November 3, 2009 at 05:28:07
What do you want the program to do when it encounters a line with less than three characters?

Report •

Related Solutions


Ask Question