|I also got thinking about doing it in pure bat, not least because UNIQUE requires the file to be sorted, which will be unacceptable in some situations.|
@echo off > outfile
if %1'==' echo which file? && goto :eof
if not exist %1 echo %1 not found && goto :eof
for /f "tokens=* delims= " %%a in (%1) do (
find "%%a" < outfile > nul
if errorlevel 1 echo %%a >> outfile
If at first you don't succeed, you're about average.