Personalize a gosto.
Código: Selecionar todos
@ECHO off
setLocal EnableDelayedExpansion
cd C:\Windows\system32\drivers\etc
find /i “www.exemplo.com.br” < hosts > nul
if errorlevel 1 (echo 127.0.0.1 www.exemplo.com.br >> hosts && echo 127.0.0.1 www2.exemplo.com.br >> hosts && echo 127.0.0.1 servidor.exemplo.com.br >> hosts)
exit