Solved text file need to remove dublicate line useing batch

July 28, 2012 at 06:24:00
Specs: Windows 7
text file need to remove dublicate line useing batch scrpit

example:

xyz
abc
xyz
qwe
qwe
i need to remove the same dulicate line like (xyz)


See More: text file need to remove dublicate line useing batch

Report •

#1
July 30, 2012 at 06:38:39
✔ Best Answer
:: ===== script starts here ===============
::
:: moha.bat 2012-07-30 20:30:50.73
@echo off > newfile & setLocal enableDELAYedeXpansioN

for /f "tokens=* delims= " %%a in (myfile) do (
find "%%a" < newfile > nul || >> newfile echo.%%a
)
goto :eof

::====== script ends here =================


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

M2


Report •
Related Solutions


Ask Question