找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3534|回复: 1

[策略设置] 简体路由表转 WIN路由表 求简化(学习用) 求简体路由表生成器

[复制链接]
发表于 2010-10-26 16:43:30 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
怎么用 一看就明白 脚本方式笨 求新方式 新方法 求个师傅给简化一下脚本  本人学习
代码如下
@ECHO OFF
title 简体路由表转换Windows系统路由表格式
color 0a
MODE CON COLS=74 LINES=20
@ECHO.
@ECHO.
@ECHO                   简体路由表转换Windows系统路由表格式
@ECHO.
@ECHO.
if not exist 路由表.txt @ECHO 没有找到简体路由表文件(路由表.txt) & pause & exit
@ECHO.
@ECHO 路由表生成中……
@ECHO.
SETLOCAL ENABLEDELAYEDEXPANSION
if exist winodws-route.bat del winodws-route.bat
echo # 更新日期:%date% %time% >>winodws-route.bat
set a=/0
set b= mask 0.0.0.0
set a4=/4
set b4= mask 240.0.0.0
set a5=/5
set b5= mask 248.0.0.0
set a6=/6
set b6= mask 252.0.0.0
set a7=/7
set b7= mask 254.0.0.0
set a8=/8
set b8= mask 255.0.0.0
set a9=/9
set b9= mask 255.128.0.0
set a10=/10
set b10= mask 255.192.0.0
set a11=/11
set b11= mask 255.224.0.0
set a12=/12
set b12= mask 255.240.0.0
set a13=/13
set b13= mask 255.248.0.0
set a14=/14
set b14= mask 255.252.0.0
set a15=/15
set b15= mask 255.254.0.0
set a16=/16
set b16= mask 255.255.0.0
set a17=/17
set b17= mask 255.255.128.0
set a18=/18
set b18= mask 255.255.192.0
set a19=/19
set b19= mask 255.255.224.0
set a20=/20
set b20= mask 255.255.240.0
set a21=/21
set b21= mask 255.255.248.0
set a22=/22
set b22= mask 255.255.252.0
set a23=/23
set b23= mask 255.255.254.0
set a24=/24
set b24= mask 255.255.255.0
set a25=/25
set b25= mask 255.255.255.128
set a26=/26
set b26= mask 255.255.255.192
set a27=/27
set b27= mask 255.255.255.224
set a28=/28
set b28= mask 255.255.255.240
set a29=/29
set b29= mask 255.255.255.248
set a30=/30
set b30= mask 255.255.255.252
set a31=/31
set b31= mask 255.255.255.254
set a32=/32
set b32= mask 255.255.255.255
for /f %%i in (路由表.txt) do (
set var=%%i
set "var=!var:%a%=%b%!"
set "var=!var:%a4%=%b4%!"
set "var=!var:%a5%=%b5%!"
set "var=!var:%a6%=%b6%!"
set "var=!var:%a7%=%b7%!"
set "var=!var:%a8%=%b8%!"
set "var=!var:%a9%=%b9%!"
set "var=!var:%a10%=%b10%!"
set "var=!var:%a11%=%b11%!"
set "var=!var:%a12%=%b12%!"
set "var=!var:%a13%=%b13%!"
set "var=!var:%a14%=%b14%!"
set "var=!var:%a15%=%b15%!"
set "var=!var:%a16%=%b16%!"
set "var=!var:%a17%=%b17%!"
set "var=!var:%a18%=%b18%!"
set "var=!var:%a19%=%b19%!"
set "var=!var:%a20%=%b20%!"
set "var=!var:%a21%=%b21%!"
set "var=!var:%a22%=%b22%!"
set "var=!var:%a23%=%b23%!"
set "var=!var:%a24%=%b24%!"
set "var=!var:%a25%=%b25%!"
set "var=!var:%a26%=%b26%!"
set "var=!var:%a27%=%b27%!"
set "var=!var:%a28%=%b28%!"
set "var=!var:%a29%=%b29%!"
set "var=!var:%a30%=%b30%!"
set "var=!var:%a31%=%b31%!"
set "var=!var:%a32%=%b32%!"
echo route add !var!网关 >>winodws-route.bat
)
@ECHO.
@ECHO Convert Complete!
@ECHO.
pause

Windows路由表制作.rar

898 Bytes, 下载次数: 1

routeros
发表于 2010-10-26 20:26:54 | 显示全部楼层
这么复杂的批处理都给你写出来,已经很不笨了,下载收藏。
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-11-22 13:03 , Processed in 0.072700 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表