电脑设置ip

 

 

@echo off
set 序号=
set /p 序号=输入计算机数字序号:
echo;%序号%|findstr "^[0-9][0-9]*$">nul||(echo;输入无效&>nul ping -n 3 0&goto :begin)
::设置ip
set name=本地连接
set /a 序号+=200
set ip=11.10.212.%序号%
set mask=255.255.252.0
set gateway=11.10.212.1
set dns1=218.85.152.99
set dns2=218.85.152.99
ver|find "5.1" >nul&&goto XP||goto Other
:XP
netsh interface ip set address name="%name%" source=static addr=%ip% mask=%mask% gateway=%gateway%
netsh interface ip set dns name="%name%" source=static addr=%dns1% register=PRIMARY 
netsh interface ip add dns name="%name%" addr=%dns2% index=2
pause&exit
:Other
netsh interface ipv4 set address name="%name%" source=static address=%ip% mask=%mask% gateway=%gateway%
netsh interface ipv4 set dnsservers name="%name%" source=static address=%dns1% register=primary
netsh interface ipv4 add dnsservers name="%name%" address=%dns2% index=2
pause&exit

  

@echo off
xcopy /hscy  "J:\aria2xiazai\阅卷系统.url"  "d:/桌面"
echo ::复制文件 xcopy /hscy  文件名   文件夹
pause

  

@echo off
move /y  J:\aria2xiazai\阅卷系统.url  d:/桌面
echo
::移动文件 MOVE  文件名   文件夹
pause

  

 

posted @ 2021-01-29 03:06  ls1519🎈  阅读(72)  评论(0编辑  收藏  举报