> That actually made it skip a line of the host file, not the "---------- > DOMLISTFINAL.TXT"
Ah, yes, didn't see that you've added an extra FIND at the end. FIND will always prepend the name of the file being scanned, so you need another FOR iteration to strip this out, viz: del /q domlist*.txt del /q hosts.txt domlist -list > domlist.txt find "Alias:" domlist.txt> domlistallaliases.txt find /v " -" domlistallaliases.txt> domlistdomainaliases.txt for /f "tokens=2 skip=4" %%i in (domlistdomainaliases.txt) do @echo %%i>> domlistdomainaliases2.txt find "mail." domlistdomainaliases2.txt> domlistonlymail.txt for /f "tokens=1 skip=2" %%i in (domlistonlymail.txt) do @echo %%i>> hosts.txt --Sandy ------------------------------------ Sanford Whiteman, Chief Technologist Broadleaf Systems, a division of Cypress Integrated Systems, Inc. e-mail: [EMAIL PROTECTED] SpamAssassin plugs into Declude! http://www.mailmage.com/products/software/freeutils/SPAMC32/download/release/ Defuse Dictionary Attacks: Turn Exchange or IMail mailboxes into IMail Aliases! http://www.mailmage.com/products/software/freeutils/exchange2aliases/download/release/ http://www.mailmage.com/products/software/freeutils/ldap2aliases/download/release/ To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/ Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/
