首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > windows >

怎么批量在把 文件里的网址转换成指定的类型

2012-03-24 
如何批量在把 文件里的网址转换成指定的类型http://bdsheying.com/forum.php?modviewthread&tid10328&pa

如何批量在把 文件里的网址转换成指定的类型
http://bdsheying.com/forum.php?mod=viewthread&tid=10328&page=1&from=space
http://bbs.sgnet.cc/thread-24897-1-1.html
http://www.cngaosu.com/a/2010/0505/59492.html
http://www.gzmama.com/thread-2571644-1-1.html
http://yaoguobbs.duowan.com/thread-15375874-1-1.html
http://www.fuxiang.com.cn/bbsxp/Archiver.asp?ThreadID=132014
http://www.510772.com/forum.php?mod=viewthread&tid=2712
http://www.dgrhy.com/
http://book.kongfz.com/19665/129931080/
http://www.discuz.net/thread-1167236-1-1.html
http://tomatolei.com/thread-6065-1-1.html
http://www.zclub.com.tw/discuz/thread-81355-2-1.html
http://www.ytbbs.com/thread-3550693-1-1.html
http://www.sztianyuan.com/
http://www.maiya.cn/forum.php?mod=viewthread&tid=8393&page=1&authorid=44084
http://www.soufun.com/ask/house/c_xian/154/b_2862338.html
http://www.fuxiang.com.cn/bbsxp/Archiver.asp?ThreadID=132004
http://www.tianya.cn/publicforum/content/free/1/1659858.shtml
http://17haosf.com/
http://www.bestb2b.com/prod_1221947.htm
http://www.zoomkobe.cn/thread-13440-1-1.html
http://www.lesco-cn.com/
http://www.mala.cn/thread-1391986-1-1.html
http://www.myclub2004.com/bbs/ViewOnline.asp?id=62920110118&clfz5lbr
http://x.in189.com/thread-143870-1-1.html
http://wenwen.soso.com/z/q276679777.htm?sp=4236
http://q.stock.sohu.com/cn/000656
http://www.pingshangren.com/forum.php?mod=viewthread&tid=17012
http://www.gddeqing.com/thread-1336-1-1.html
http://www.lingb.net/thread-112103-1-1.html
http://www.293.net/zhoul.com
http://www.discuz.net/home.php?mod=space&uid=1133332&do=thread&type=reply&view=me&from=space
http://www.discuz.net/thread-2364834-1-1.html
http://xmte.00e.org/
http://www.nanlingbbs.com/forum-viewthread-action-printable-tid-2367.html
http://bbs.jysq.net/thread-1785205-72-1.html
http://baibangni.cn.makepolo.com/
http://www.tudou.com/programs/view/agYJxY0sZeY/
http://www.xysta.net/
http://bbs.yizheng.gov.cn/ShowPost.asp?ThreadID=690853
http://travel.bbs.qianlong.com/thread-4968573-1-1.html
http://blog.xwhb.net/?uid-40564-action-viewspace-itemid-24208
http://cfwaiguawww.myip.cn/sitemaps/sitemap2918.html
http://bbs.bl900.com/thread-3095-6-1.html
http://www.discuz.net/home.php?mod=space&uid=1044879&do=thread&view=me&type=reply&order=dateline&from=space&page=1
http://www.wkabc.com/detail/422266.html
http://www.adminkc.com/762/428-ncg5.com/
http://bbs.southcn.com/tag.php?name=公安局&page=1
http://www.daodao.com/Hotel_Review-g297463-d1239536-Reviews-Home_Inn_Chengdu_Wuhou_Avenue-Chengdu_Sichuan.html
http://www.haiyangfelt.com/
http://www.chinaxuanmen.com/forum.php?mod=viewthread&tid=1440&page=1
http://bbs.yizheng.gov.cn/ShowPost.asp?ThreadID=690842
http://www.polech.com.cn/
http://www.szmama.com/bbs/thread-120037-2-1.html
http://www.wujianrong.com/mt-search.cgi?tag=网站备案&blog_id=1&IncludeBlogs=1
http://bbs.byr.cc/forum.php?mod=viewthread&action=printable&tid=12491
http://bbs.youkuspace.com/forum-viewthread-tid-166-highlight.html
http://0514.job1001.com/area/jiangdu
http://www.discuz.net/thread-576159-1-1.html
http://www.discuz.net/thread-1876789-1-1.html
http://www.discuz.net/thread-2152111-1-1.html
http://zzhzbbs.zjol.com.cn/forum.php?mod=viewthread&tid=9051915&ordertype=1
http://www.soundwel.cn/
http://1481492.blog.51cto.com/
http://anqing.58.com/zufang/6104793752964x.shtml
http://www.php-cms.info/a/discuz/2011/0612/1845.html
http://www.chinawj.com.cn/invest/invest_show.shtml?id=10082
http://bbs.zggs.gov.cn/viewthread.php?tid=82707
http://stock.hexun.com/2011-10-14/134206380.html
http://www.joustar.com/forum-viewthread-tid-79712-extra-page=1-page-2.html
http://www.sdnw.gov.cn/
http://www.qianyan.biz/sshow-45417681.html


http://newhouse.zz.soufun.com/house/web/newhouse_bookhouse_more_info.php?newcode=2510661301&projname=????????
http://chinazg.net/bbs/Profile.asp?UID=1618
http://dalian.anjuke.com/sale/shahekou/m135-p46-s2
http://bbs.703804.com/thread-12972198-1-1.html
http://bbs.ahu.edu.cn/viewthread.php?tid=59184&page=10
http://huainan.baixing.com/zhengzu/?areaName=panji&bannerId=436
http://bbs.yxol.net/forum.php?mod=viewthread&tid=28167
http://tjfishing.cn/forum-viewthread-tid-2108-extra-&page=1-page-1.html
http://bz.5sing.com/1017325.html
http://bbs.yxol.net/forum.php?mod=viewthread&tid=28169
http://www.cudi.cn/2011/xbly_1017/737.html
http://bbs.yxol.net/forum.php?mod=viewthread&tid=28163
http://www.cityhappy.cn/my1800bbs
http://bbs.0554cc.com/thread-923913-1-1.html
http://www.zjgm.cn/
http://www.mycollect.net/trade/show-978638-2.html
http://hotel.qunar.com/sitemap/qiannan-200-0.html
http://www.ydyg.org.cn/forum.php?mod=viewthread&tid=6789
http://whb.news365.com.cn/zhxw/201109/t20110906_3128559.htm
http://www.hsubbs.com/thread-76495-1-1.html
http://www.shyfcw.com/bbsxp/Online.asp
http://home.mala.cn/thread-2472246-1-1.html
http://bbs.laoqianzhuang.com/forum.php?mod=viewthread&tid=1098845&highlight=&page=1
http://alexclark.itpub.net/post/670/407321
http://533433.com/post/4083.html
http://www.wfbbs.com/home.php?mod=space&uid=209&do=thread&view=me&from=space
http://www.ditan518.com/forum.php?mod=viewthread&tid=2855&highlight=
http://bbs.52pcgame.com/thread-214980-1-1.html
http://www.sootoo.com/content/26931/
http://www.sh-cruze.com/bbs/thread-47386-1-1.html
http://www.mala.cn/thread-409692-1-1.html
http://v.youku.com/v_show/id_XMjgxNDU1ODA0.html
http://www.91xiubbs.com/thread-278677-1-1.html
http://bbs.jysq.net/thread-1474855-4-1.html
http://www.chengdu.gov.cn/special/lianghui2008/detail.jsp?ID=277993
http://internal.dbw.cn/system/2011/10/11/053442870.shtml
http://www.gov.china001.com/show_hdr.php?xname=FEE2511&dname=23UUB11&xpos=6
http://mil.tianjin.net/
http://v.youku.com/v_show/id_XMzQ1MDAxMTY=.html
http://bbs.py168.com/thread-1334502-1-1.html
http://www.tjlxx.net/
http://www.gov.china001.com/show_hdr.php?xname=FEE2511&dname=23UUB11&xpos=8
http://www.csibally.net/bbs/blog.asp?id=1517
http://bbs.yizheng.gov.cn/ShowPost.asp?ThreadID=194250
http://bbs.hcbbs.com/viewthread.php?tid=301940

上述是记事本里的网址


目标是转换成每一个网址的最后一个斜杠处(/)
以下面几条网址为例:
原网址
http://bdsheying.com/forum.php?mod=viewthread&tid=10328&page=1&from=space
http://bbs.sgnet.cc/thread-24897-1-1.html
http://www.cngaosu.com/a/2010/0505/59492.html
http://www.gzmama.com/thread-2571644-1-1.html
http://yaoguobbs.duowan.com/thread-15375874-1-1.html
http://www.fuxiang.com.cn/bbsxp/Archiver.asp?ThreadID=132014
http://www.510772.com/forum.php?mod=viewthread&tid=2712
http://www.dgrhy.com/

转换成
http://bdsheying.com/
http://bbs.sgnet.cc/
http://www.cngaosu.com/a/2010/0505/
http://www.gzmama.com/
http://yaoguobbs.duowan.com/
http://www.fuxiang.com.cn/bbsxp/
http://www.510772.com/
http://www.dgrhy.com/
特别注意的就是 如果原为址就是主页地址无需转换 
像最后一条
http://www.dgrhy.com/
那那转换之后还是
http://www.dgrhy.com/
那位高帮忙看看有什么简单的方法 谢谢了




[解决办法]
开关没关,呵呵

VBScript code
@echo off>test2.txtset js=0setlocal enabledelayedexpansionfor /f "tokens=*" %%a in (test.txt) do ( set url=%%~pa set url=!url:~1! set url=!url::\=://! set url=!url:\=/! findstr /ixm "!url!" test2.txt>nul&&set /a js+=1||echo !url!>>test2.txt)echo 筛选掉 %js% 个重复网址,按任意键退出...pause>nul 

热点排行