阿里云添加路由的Windows批处理文件
发现一段很好的学习bat程序的示例代码,分享给大家,具体代码如下:
@echooff
routeprint-4"10.0.0.0"|find"10.0.0.0">route_list
setgw=
for/F"tokens=1-5"%%ain('typeroute_list')do(
ifnot"%%c"==""(setgw=%%c)
)
if"%gw%"==""(echo"failtogeteth0defaultgw"&&gotoerror)
routeprint-4100.64.0.0|find"%gw%">NUL
ifnot"%errorlevel%"=="0"(
route-padd100.64.0.0mask255.192.0.0%gw%>NUL2>&1
)
ifnot"%errorlevel%"=="0"(echo"faildtoaddroute100.64.0.0/10"&&gotoerror)
:success
delroute_list
echo"add100.64.0.0/10success!"
timeout10
exit0
:error
timeout10
exit1
以上所述是小编给大家介绍的阿里云添加路由的Windows批处理文件,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对毛票票网站的支持!