remove duplicate lines from my text file using .bat file

June 4, 2012 at 12:18:19
Specs: Windows XP

now i want to remove two instances of line "This is me" and retain just one line. please suggest how should i do it using .bat file

Thanks
Rahul


See More: remove duplicate lines from my text file using .bat file

Report •


#1
June 4, 2012 at 19:26:57
:: ===== script starts here ===============
:: no dups
:: rahul.bat Tue 05-06-2012 9:20:52.14
@echo off > newfile & setLocal enableDELAYedeXpansioN

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


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

M2


Report •
Related Solutions


Ask Question