IT

batch 프로그램으로 host 변경하기

상쾌한기분 2019. 10. 25. 11:15
반응형

파일 4개를 생성

hosts_normal.txt 파일에는 기본 host 내용을 적고
hosts_test.txt 파일에는 추가할 ip와 domain 내용을 적고 저장한다

## hosts_normal.bat 파일 내용
@echo off

copy /Y C:\Windows\System32\drivers\etc\hosts_normal.txt C:\Windows\System32\drivers\etc\hosts

## hosts_test.bat 파일 내용
@echo off

copy /Y C:\Windows\System32\drivers\etc\hosts_test.txt C:\Windows\System32\drivers\etc\hosts
728x90
반응형