CODE: [Copy to clipboard]@echo off for /f "tokens=1,2" %%a in (urfile.ext) do ( if "%%b"=="#safe" >>newfile.txt echo %%a )