remove string from a text file

Microsoft Windows xp professional w/sp2
May 27, 2010 at 10:56:23
Specs: N/A
Hi,

I'm looking for a script or a batch that removing the last 10 chars from each line on a text file

S.


See More: remove string from a text file

Report •


#1
May 27, 2010 at 12:14:47
@echo off > newfile & setLocal enableDELAYedeXpansion

for /f "tokens=* delims= " %%a in (myfile) do (
set S=%%a
set S=!S:~0,-10!
>> newfile echo.!S!
)


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

M2


Report •

#2
May 27, 2010 at 13:15:05
You are the men M2

10x

:-)


Report •

Related Solutions


Ask Question