[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[文本处理] [已解决]请教如何用批处理提取文本的特定内容另存为另一个

求助,我要将附件文本中的内容用批处理提取如附图的格式,需要怎么写呢
需要提取每行中第一个出现的ChannelName="旅游卫视"引号中的内容以及第一个出现的rtsp://121.....smil的字段,(从rtsp开始到smil结尾的字段)
另存为附图的格式,其它的忽略掉,后面可能有相同的内容但只要选取第一个出现的
感谢帮忙,谢谢
1

评分人数

    • Batcher: 感谢给帖子标题标注[已解决]字样PB + 2

回复 12# xczxczxcz


    你也知道是可以的那就行了。我只是觉得你那样肯定说UTF的bat是不能运行的说法,是会误导别人的。
至于每个人会不会用 觉不觉得麻烦那是另外一回事了。

TOP

回复 11# cfwyy77_bat


    如果一定要从技术手段上 处理,当然可以。经常改chcp 936 65001 不麻烦吗。而且改了也不一定就能正常运行。偶尔会成功。偶是不会去做那些。用一些判断句子不更好么。通杀。水平有限,不想钻得那么深。能解决一些日常问题即可。

TOP

回复 8# xczxczxcz

,谁说有中文的 utf-8的批处理不能运行的? 为什么 我这有中文的utf-8 的bat 运行的好好的。
utf-8 也分有bom 和没有bom的, 用记事本保存的utf-8是有bom的。
有bom的utf-8的 bat,也不是说不能运行,只不过运行起来 解析有问题,乱码而已。
无bom的utf-8  bat,可以正常运行。
也可以参考大神的帖子。
http://www.bathome.net/viewthread.php?tid=12824&from=favorites

TOP

谢谢楼上各位,已完美解决

TOP

  1. 旅游卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226330/10000100000000060000000002139644_0.smil
  2. 三沙卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226331/10000100000000060000000002141247_0.smil
  3. 海南综合,rtsp://121.58.56.202/PLTV/88888898/224/3221226328/10000100000000060000000002139439_0.smil
  4. 海南新闻,rtsp://121.58.56.202/PLTV/88888898/224/3221226332/10000100000000060000000002141248_0.smil
  5. 海南公共,rtsp://121.58.56.202/PLTV/88888898/224/3221226333/10000100000000060000000002141622_0.smil
  6. 海南影视,rtsp://121.58.56.202/PLTV/88888898/224/3221226334/10000100000000060000000002141623_0.smil
  7. 海南青少,rtsp://121.58.56.202/PLTV/88888898/224/3221226335/10000100000000060000000002141625_0.smil
  8. 海口1台,rtsp://121.58.56.202/PLTV/88888898/224/3221226414/10000100000000060000000004791943_0.smil
  9. 三亚1台,rtsp://121.58.56.202/PLTV/88888898/224/3221226416/10000100000000060000000004792073_0.smil
  10. CCTV-1,rtsp://121.58.56.202/PLTV/88888898/224/3221226329/10000100000000060000000002139616_0.smil
  11. CCTV-2,rtsp://121.58.56.202/PLTV/88888898/224/3221226336/10000100000000060000000002142197_0.smil
  12. IPTV3+,rtsp://121.58.56.202/PLTV/88888888/224/3221226154/10000100000000060000000001008081_0.smil
  13. CCTV-4,rtsp://121.58.56.202/PLTV/88888898/224/3221226338/10000100000000060000000002142201_0.smil
  14. IPTV5+,rtsp://121.58.56.202/PLTV/88888888/224/3221226153/10000100000000060000000001008080_0.smil
  15. IPTV6+,rtsp://121.58.56.202/PLTV/88888888/224/3221226155/10000100000000060000000001008082_0.smil
  16. CCTV-7,rtsp://121.58.56.202/PLTV/88888898/224/3221226337/10000100000000060000000002142198_0.smil
  17. IPTV8+,rtsp://121.58.56.202/PLTV/88888888/224/3221226156/10000100000000060000000001008147_0.smil
  18. CCTV-9,rtsp://121.58.56.202/PLTV/88888888/224/3221226304/10000100000000060000000001961049_0.smil
  19. CCTV-10,rtsp://121.58.56.202/PLTV/88888898/224/3221226356/10000100000000060000000002222617_0.smil
  20. CCTV-11,rtsp://121.58.56.202/PLTV/88888898/224/3221226358/10000100000000060000000002222814_0.smil
  21. CCTV-12,rtsp://121.58.56.202/PLTV/88888898/224/3221226359/10000100000000060000000002222815_0.smil
  22. CCTV-13,rtsp://121.58.56.202/PLTV/88888898/224/3221226380/10000100000000060000000002232032_0.smil
  23. CCTV-14,rtsp://121.58.56.202/PLTV/88888898/224/3221226381/10000100000000060000000002232033_0.smil
  24. CCTV-15,rtsp://121.58.56.202/PLTV/88888898/224/3221226382/10000100000000060000000002232034_0.smil
  25. 北京卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226345/10000100000000060000000002197821_0.smil
  26. 东方卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226383/10000100000000060000000002232204_0.smil
  27. 江苏卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226357/10000100000000060000000002222618_0.smil
  28. 浙江卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226384/10000100000000060000000002232206_0.smil
  29. 安徽卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226369/10000100000000060000000002226195_0.smil
  30. 山东卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226367/10000100000000060000000002226193_0.smil
  31. 山西卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226340/10000100000000060000000002142942_0.smil
  32. 湖南卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226339/10000100000000060000000002142354_0.smil
  33. 湖北卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226352/10000100000000060000000002213149_0.smil
  34. 江西卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226341/10000100000000060000000002142956_0.smil
  35. 重庆卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226342/10000100000000060000000002142991_0.smil
  36. 四川卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226368/10000100000000060000000002226194_0.smil
  37. 陕西卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226343/10000100000000060000000002197778_0.smil
  38. 河南卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226344/10000100000000060000000002197807_0.smil
  39. 河北卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226346/10000100000000060000000002198230_0.smil
  40. 天津卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226347/10000100000000060000000002198231_0.smil
  41. 辽宁卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226348/10000100000000060000000002198234_0.smil
  42. 黑龙江卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226349/10000100000000060000000002198250_0.smil
  43. 东南卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226350/10000100000000060000000002198263_0.smil
  44. 广东卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226366/10000100000000060000000002223433_0.smil
  45. 广西卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226317/10000100000000060000000002095065_0.smil
  46. 甘肃卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226318/10000100000000060000000002106716_0.smil
  47. 贵州卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226319/10000100000000060000000002106717_0.smil
  48. 宁夏卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226321/10000100000000060000000002107243_0.smil
  49. 青海卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226320/10000100000000060000000002107241_0.smil
  50. 吉林卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226322/10000100000000060000000002107507_0.smil
  51. 西藏卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226323/10000100000000060000000002107509_0.smil
  52. 内蒙古卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226324/10000100000000060000000002107510_0.smil
  53. 深圳卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226325/10000100000000060000000002108375_0.smil
  54. 新疆卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226326/10000100000000060000000002108376_0.smil
  55. 云南卫视,rtsp://121.58.56.202/PLTV/88888898/224/3221226327/10000100000000060000000002108377_0.smil
  56. 金鹰卡通,rtsp://121.58.56.202/PLTV/88888898/224/3221226353/10000100000000060000000002213157_0.smil
  57. 纪实频道,rtsp://121.58.56.202/PLTV/88888888/224/3221226123/10000100000000060000000000655107_0.smil
  58. 炫动卡通,rtsp://121.58.56.202/PLTV/88888888/224/0/3221225760/iptv18228.smil
  59. CGTN,rtsp://121.58.56.202/PLTV/88888898/224/3221226351/10000100000000060000000002213135_0.smil
  60. 都市剧场,rtsp://121.58.56.202/PLTV/88888898/224/3221226354/10000100000000060000000002213405_0.smil
  61. 欢笑剧场,rtsp://121.58.56.202/PLTV/88888898/224/3221226355/10000100000000060000000002213419_0.smil
  62. 劲爆体育,rtsp://121.58.56.202/PLTV/88888898/224/3221226395/10000100000000060000000002258077_0.smil
  63. 生活时尚,rtsp://121.58.56.202/PLTV/88888898/224/3221226363/10000100000000060000000002222927_0.smil
  64. 全纪实,rtsp://121.58.56.202/PLTV/88888898/224/3221226374/10000100000000060000000002227103_0.smil
  65. 法治天地,rtsp://121.58.56.202/PLTV/88888898/224/3221226373/10000100000000060000000002227102_0.smil
  66. 东方财经,rtsp://121.58.56.202/PLTV/88888898/224/3221226372/10000100000000060000000002227099_0.smil
  67. 魅力音乐,rtsp://121.58.56.202/PLTV/88888889/224/3221226396/10000100000000060000000002262925_0.smil
  68. 七彩戏剧,rtsp://121.58.56.202/PLTV/88888898/224/3221226362/10000100000000060000000002222926_0.smil
  69. 动漫秀场,rtsp://121.58.56.202/PLTV/88888898/224/3221226365/10000100000000060000000002222974_0.smil
  70. 游戏风云,rtsp://121.58.56.202/PLTV/88888898/224/3221226361/10000100000000060000000002222925_0.smil
  71. 幸福彩,rtsp://121.58.56.202/PLTV/88888898/224/3221226360/10000100000000060000000002222924_0.smil
  72. 极速汽车,rtsp://121.58.56.202/PLTV/88888898/224/3221226364/10000100000000060000000002222973_0.smil
  73. 金色频道,rtsp://121.58.56.202/PLTV/88888898/224/3221226371/10000100000000060000000002227098_0.smil
  74. 嘉佳卡通,rtsp://121.58.56.202/PLTV/88888898/224/3221226370/10000100000000060000000002227084_0.smil
  75. 热播剧场,rtsp://121.58.56.202/PLTV/88888888/224/3221226269/10000100000000060000000001905603_0.smil
  76. IPTV谍战剧场,rtsp://121.58.56.202/PLTV/88888888/224/3221226271/10000100000000060000000001905606_0.smil
  77. IPTV法治,rtsp://121.58.56.202/PLTV/88888888/224/3221226273/10000100000000060000000001905608_0.smil
  78. IPTV相声小品,rtsp://121.58.56.202/PLTV/88888888/224/3221226270/10000100000000060000000001905605_0.smil
  79. IPTV野外,rtsp://121.58.56.202/PLTV/88888888/224/3221226272/10000100000000060000000001905607_0.smil
  80. 爱生活,rtsp://121.58.56.202/PLTV/88888888/224/3221226274/10000100000000060000000001913719_0.smil
  81. 财富天下,rtsp://121.58.56.202/PLTV/88888888/224/3221226281/10000100000000060000000001913729_0.smil
  82. 城市剧场,rtsp://121.58.56.202/PLTV/88888888/224/3221226278/10000100000000060000000001913724_0.smil
  83. 地理,rtsp://121.58.56.202/PLTV/88888888/224/3221226277/10000100000000060000000001913723_0.smil
  84. 动作影院,rtsp://121.58.56.202/PLTV/88888888/224/3221226280/10000100000000060000000001913728_0.smil
  85. 古装剧场,rtsp://121.58.56.202/PLTV/88888888/224/3221226279/10000100000000060000000001913727_0.smil
  86. 国学,rtsp://121.58.56.202/PLTV/88888888/224/3221226275/10000100000000060000000001913720_0.smil
  87. 好学生,rtsp://121.58.56.202/PLTV/88888888/224/3221226276/10000100000000060000000001913721_0.smil
  88. 家庭影院,rtsp://121.58.56.202/PLTV/88888888/224/3221226285/10000100000000060000000001917598_0.smil
  89. 经典电影,rtsp://121.58.56.202/PLTV/88888888/224/3221226294/10000100000000060000000001917609_0.smil
  90. 军旅剧场,rtsp://121.58.56.202/PLTV/88888888/224/3221226286/10000100000000060000000001917601_0.smil
  91. 军事,rtsp://121.58.56.202/PLTV/88888888/224/3221226289/10000100000000060000000001917604_0.smil
  92. 卡酷动画,rtsp://121.58.56.202/PLTV/88888888/224/3221226297/10000100000000060000000001917612_0.smil
  93. 魅力时尚,rtsp://121.58.56.202/PLTV/88888888/224/3221226296/10000100000000060000000001917611_0.smil
  94. 少儿动画,rtsp://121.58.56.202/PLTV/88888888/224/3221226295/10000100000000060000000001917610_0.smil
  95. 喜剧影院,rtsp://121.58.56.202/PLTV/88888888/224/3221226292/10000100000000060000000001917607_0.smil
  96. 戏曲,rtsp://121.58.56.202/PLTV/88888888/224/3221226290/10000100000000060000000001917605_0.smil
  97. 音乐现场,rtsp://121.58.56.202/PLTV/88888888/224/3221226287/10000100000000060000000001917602_0.smil
  98. 早教,rtsp://121.58.56.202/PLTV/88888888/224/3221226288/10000100000000060000000001917603_0.smil
  99. 足球,rtsp://121.58.56.202/PLTV/88888888/224/3221226291/10000100000000060000000001917606_0.smil
  100. 收视指南,rtsp://121.58.56.202/PLTV/88888888/224/3221226293/10000100000000060000000001917608_0.smil
  101. 熊猫频道,rtsp://121.58.56.202/PLTV/88888888/224/3221226298/10000100000000060000000001917614_0.smil
  102. Knews24,rtsp://121.58.56.202/PLTV/88888888/224/3221226187/10000100000000060000000000407266_0_mdn_1.smil
  103. 星光影院,rtsp://121.58.56.202/PLTV/88888888/224/0/3221225793/iptv18255.smil
  104. 全球大片,rtsp://121.58.56.202/PLTV/88888888/224/3221226117/10000100000000060000000000485917_0.smil
  105. 中国气象,rtsp://121.58.56.202/PLTV/88888888/224/0/3221225792/iptv18256.smil
  106. 热门剧场,rtsp://121.58.56.202/PLTV/88888888/224/0/3221225791/iptv18257.smil
  107. 股评汇,rtsp://121.58.56.202/PLTV/88888888/224/3221226164/10000100000000060000000001037502_0.smil
  108. 港剧风云,rtsp://121.58.56.202/PLTV/88888888/224/0/3221225818/iptv18260.smil
  109. 喜剧剧场,rtsp://121.58.56.202/PLTV/88888888/224/0/3221225726/iptv18262.smil
  110. 青春动漫,rtsp://121.58.56.202/PLTV/88888888/224/0/3221225725/iptv18263.smil
  111. 热门综艺,rtsp://121.58.56.202/PLTV/88888888/224/0/3221225813/iptv18268.smil
  112. 科技探索,rtsp://121.58.56.202/PLTV/88888888/224/0/3221225809/iptv18272.smil
  113. 山东教育,rtsp://121.58.56.202/PLTV/88888888/224/3221226300/10000100000000060000000001919155_0.smil
  114. 导视,rtsp://121.58.56.202/PLTV/88888888/224/0/3221225802/iptv18246.smil
  115. 旅游卫视高清,rtsp://121.58.56.202/PLTV/88888888/224/3221226308/10000100000000060000000002079238_0.smil
  116. CCTV-1高清,rtsp://121.58.56.202/PLTV/88888898/224/3221226379/10000100000000060000000002231939_0.smil
  117. CCTV-2高清,rtsp://121.58.56.202/PLTV/88888888/224/3221226254/10000100000000060000000001754363_0.smil
  118. CCTV-4高清,rtsp://121.58.56.202/PLTV/88888898/224/3221226406/10000100000000060000000003794850_0.smil
  119. CCTV-7高清,rtsp://121.58.56.202/PLTV/88888888/224/3221226257/10000100000000060000000001762841_0.smil
  120. CCTV-9高清,rtsp://121.58.56.202/PLTV/88888888/224/3221226258/10000100000000060000000001771358_0.smil
  121. CCTV-10高清,rtsp://121.58.56.202/PLTV/88888888/224/3221226259/10000100000000060000000001771360_0.smil
  122. CCTV-12高清,rtsp://121.58.56.202/PLTV/88888888/224/3221226261/10000100000000060000000001771362_0.smil
  123. CCTV-14高清,rtsp://121.58.56.202/PLTV/88888888/224/3221226260/10000100000000060000000001771361_0.smil
  124. CCTV-5+高清,rtsp://121.58.56.202/PLTV/88888888/224/3221226263/10000100000000060000000001771392_0.smil
  125. IPTV5+高清,rtsp://121.58.56.202/PLTV/88888888/224/3221226262/10000100000000060000000001771391_0.smil
  126. 湖南卫视高清,rtsp://121.58.56.202/PLTV/88888898/224/3221226386/10000100000000060000000002232252_0.smil
  127. 广东卫视高清,rtsp://121.58.56.202/PLTV/88888898/224/3221226385/10000100000000060000000002232251_0.smil
  128. 北京卫视高清,rtsp://121.58.56.202/PLTV/88888898/224/3221226387/10000100000000060000000002232508_0.smil
  129. 东方卫视高清,rtsp://121.58.56.202/PLTV/88888898/224/3221226394/10000100000000060000000002236684_0.smil
  130. 浙江卫视高清,rtsp://121.58.56.202/PLTV/88888898/224/3221226393/10000100000000060000000002236683_0.smil
  131. 江苏卫视高清,rtsp://121.58.56.202/PLTV/88888898/224/3221226388/10000100000000060000000002232509_0.smil
  132. 黑龙江卫视高清,rtsp://121.58.56.202/PLTV/88888898/224/3221226389/10000100000000060000000002232510_0.smil
  133. 湖北卫视高清,rtsp://121.58.56.202/PLTV/88888898/224/3221226390/10000100000000060000000002232511_0.smil
  134. 深圳卫视高清,rtsp://121.58.56.202/PLTV/88888898/224/3221226391/10000100000000060000000002232546_0.smil
  135. 山东卫视高清,rtsp://121.58.56.202/PLTV/88888898/224/3221226392/10000100000000060000000002232548_0.smil
  136. 安徽卫视高清,rtsp://121.58.56.202/PLTV/88888888/224/3221226266/10000100000000060000000001811199_0.smil
  137. 河北卫视高清,rtsp://121.58.56.202/PLTV/88888898/224/3221226407/10000100000000060000000003794851_0.smil
  138. 辽宁卫视高清,rtsp://121.58.56.202/PLTV/88888888/224/3221226265/10000100000000060000000001811198_0.smil
  139. 贵州卫视高清,rtsp://121.58.56.202/PLTV/88888898/224/3221226408/10000100000000060000000003794852_0.smil
  140. 纪实频道HD,rtsp://121.58.56.202/PLTV/88888888/224/3221226264/10000100000000060000000001789020_0.smil
  141. 金鹰纪实高清,rtsp://121.58.56.202/PLTV/88888888/224/3221226268/10000100000000060000000001903355_0.smil
  142. 教育1高清,rtsp://121.58.56.202/PLTV/88888888/224/3221226267/10000100000000060000000001903353_0.smil
  143. 爱上4K,rtsp://121.58.56.202/PLTV/88888888/224/3221226302/10000100000000060000000001943465_0.smil
  144. 劲爆体育HD,rtsp://121.58.56.202/PLTV/88888888/224/3221226028/10000100000000060000000000139285_0.smil
  145. 都市剧场HD,rtsp://121.58.56.202/PLTV/88888888/224/3221226238/10000100000000060000000001428633_0_mdn_1.smil
  146. 动漫秀场HD,rtsp://121.58.56.202/PLTV/88888888/224/3221226239/10000100000000060000000001428634_0_mdn_1.smil
  147. 幸福彩HD,rtsp://121.58.56.202/PLTV/88888888/224/3221226240/10000100000000060000000001428635_0_mdn_1.smil
  148. 生活时尚HD,rtsp://121.58.56.202/PLTV/88888888/224/3221226241/10000100000000060000000001428636_0_mdn_1.smil
  149. 游戏风云HD,rtsp://121.58.56.202/PLTV/88888888/224/3221226242/10000100000000060000000001428637_0_mdn_1.smil
  150. 极速汽车HD,rtsp://121.58.56.202/PLTV/88888888/224/3221226236/10000100000000060000000001428621_0_mdn_1.smil
  151. 陶瓷HD,rtsp://121.58.56.202/PLTV/88888888/224/3221226244/10000100000000060000000001453058_0_mdn_1.smil
  152. Knews24-HD,rtsp://121.58.56.202/PLTV/88888888/224/3221226189/10000100000000060000000001291790_0.smil
  153. 我家大厨,rtsp://121.58.56.202/PLTV/88888888/224/3221226401/10000100000000060000000002758642_0.smil
  154. 直播室201,rtsp://121.58.56.202/PLTV/88888888/224/3221226197/10000100000000060000000000407198_0_mdn_4.smil
  155. 直播室202,rtsp://121.58.56.202/PLTV/88888888/224/3221226199/10000100000000060000000000407199_0_mdn_2.smil
  156. 直播室203,rtsp://121.58.56.202/PLTV/88888888/224/3221226201/10000100000000060000000000407263_0_mdn_2.smil
  157. 直播室204,rtsp://121.58.56.202/PLTV/88888888/224/3221226203/10000100000000060000000000407262_0_mdn_2.smil
  158. 直播室205,rtsp://121.58.56.202/PLTV/88888888/224/3221226205/10000100000000060000000000407261_0_mdn_2.smil
  159. 直播室206,rtsp://121.58.56.202/PLTV/88888888/224/3221226207/10000100000000060000000000407264_0_mdn_2.smil
  160. 直播室207,rtsp://121.58.56.202/PLTV/88888888/224/3221226209/10000100000000060000000000407265_0_mdn_2.smil
  161. 直播室208,rtsp://121.58.56.202/PLTV/88888888/224/3221226211/10000100000000060000000001352706_0_mdn_1.smil
  162. 直播室209,rtsp://121.58.56.202/PLTV/88888888/224/3221226215/10000100000000060000000001352810_0_mdn_1.smil
  163. 直播室210,rtsp://121.58.56.202/PLTV/88888888/224/3221226216/10000100000000060000000001352814_0_mdn_1.smil
  164. 直播室211,rtsp://121.58.56.202/PLTV/88888888/224/3221226217/10000100000000060000000001352816_0_mdn_1.smil
  165. 直播室101,rtsp://121.58.56.202/PLTV/88888888/224/3221226218/10000100000000060000000001358727_0.smil
  166. 直播室102,rtsp://121.58.56.202/PLTV/88888888/224/3221226219/10000100000000060000000001359672_0.smil
  167. 直播室103,rtsp://121.58.56.202/PLTV/88888888/224/3221226220/10000100000000060000000001359673_0.smil
  168. 直播室104,rtsp://121.58.56.202/PLTV/88888888/224/3221226221/10000100000000060000000001359674_0.smil
  169. 直播室105,rtsp://121.58.56.202/PLTV/88888888/224/3221226222/10000100000000060000000001359675_0.smil
  170. 直播室106,rtsp://121.58.56.202/PLTV/88888888/224/3221226223/10000100000000060000000001359676_0.smil
  171. 直播室107,rtsp://121.58.56.202/PLTV/88888888/224/3221226228/10000100000000060000000001359685_0.smil
  172. 直播室108,rtsp://121.58.56.202/PLTV/88888888/224/3221226224/10000100000000060000000001359677_0.smil
  173. 直播室109,rtsp://121.58.56.202/PLTV/88888888/224/3221226225/10000100000000060000000001359678_0.smil
  174. 直播室110,rtsp://121.58.56.202/PLTV/88888888/224/3221226226/10000100000000060000000001359679_0.smil
  175. 直播室111,rtsp://121.58.56.202/PLTV/88888888/224/3221226227/10000100000000060000000001359680_0.smil
  176. 导视测试,rtsp://121.58.56.202/PLTV/88888889/224/3221226410/10000100000000060000000004554307_0.smil
  177. 测试3,rtsp://121.58.56.202/PLTV/88888898/224/3221226397/10000100000000060000000002294868_0.smil
  178. 测试5,rtsp://121.58.56.202/PLTV/88888898/224/3221226398/10000100000000060000000002294869_0.smil
  179. 测试6,rtsp://121.58.56.202/PLTV/88888898/224/3221226400/10000100000000060000000002294871_0.smil
  180. 测试8,rtsp://121.58.56.202/PLTV/88888898/224/3221226399/10000100000000060000000002294870_0.smil
  181. 测试100-1,rtsp://121.58.56.202/PLTV/88888898/224/3221226409/10000100000000060000000004236527_0.smil
复制代码
感觉好像是以前的山东卫视。

TOP

bat cmd 文件件 中 有中文内容 就不能保存为 utf-8 否则无法运行。
建议下个 iconv.exe 放到 %windir%\system32 下。

在 批处理的末尾加上 转码语句
icone.exe -f gbk -t utf-8 "xxxx\xxx.xxx">"你最终要生成的文件"
1

评分人数

TOP

回复 6# wudown


  具体是怎么个不能运行?你用什么编辑器保存bat文件的?不要和我说是记事本啊,记事本保的utf-8有BOM头的。
可以用 notepad++ 等其它编辑器保存成 无BOM的utf-8,再试试。

TOP

本帖最后由 wudown 于 2018-8-8 11:50 编辑

回复 5# cfwyy77_bat


    非常感谢回复,我试过保存成UTF-8不能运行

TOP

回复 4# wudown
哦哦 没仔细看文件编码 不好意思。bat 对utf-8的支持  是不怎么友好,不过倒也可以的。
bat 前面再加一句
  1. chcp 65001
复制代码
bat也保存成 utf-8 再运行就可以了。

TOP

非常感谢楼上,能处理
但有个小问题,原文本是UTF-8格式的,能否直接在原格式改,改完后还能保持UTF-8呢
现在要先将它转为ANSI格式执行,否则出来乱码呢

TOP

本帖最后由 cfwyy77_bat 于 2018-8-4 22:14 编辑

我略看一下源文本很规整,就直接用for 分段取出来了,没有一条条去对,请自己确认一下结果。
  1. @echo off
  2. (for /f tokens^=4^,9^ delims^=^"?^| %%a in (海南电信.txt) do echo %%a,%%b)>new.txt
  3. pause
复制代码
1

评分人数

TOP

发出来后不知怎么多了两个图片,编辑不掉

TOP

返回列表