本帖最后由 aloha20200628 于 2024-11-18 18:30 编辑
回复 1# 北极奇熊
也许可以简化为如下... | @echo off &setlocal | | set "HOSTS_FILE=%SystemRoot%\System32\drivers\etc\hosts" | | set "TEMP_FILE=%TEMP%\hosts.tmp" | | findstr /v /c:"172.72.14.216 " /c:"172.72.14.217 " /c:"172.72.14.218 " "%HOSTS_FILE%">"%TEMP_FILE%" | | move /y "%TEMP_FILE%" "%HOSTS_FILE%" 2>nul | | endlocal&pause&exit/bCOPY |
|