delete last string value

May 24, 2011 at 21:15:32
Specs: Windows XP
txt file full of various sized strings

would like to delete all of the last string values on all of the lines.

ex. www.google.com
= www.google.co

thanks


See More: delete last string value

Report •


#1
May 24, 2011 at 23:29:42
:: ==========================================
::
:: 4341524c.bat Wed 25-05-2011 13:24:22.98
@echo off > newfile & setLocal enableDELAYedeXpansioN

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


=====================================
Life is too important to be taken seriously.

M2


Report •

#2
May 25, 2011 at 16:31:36
hi although the answer to my question has been answered
i have not fully explained the problem.

i was after the original document to be changed and no echo of the original lines.

original doc

www.google.com
www.google.com


re-written original doc

www.google.co
www.google.co


Report •

Related Solutions


Ask Question