Board logo

标题: [文件操作] 【已解决】BAT怎样过滤特殊字符 [打印本页]

作者: 1270697389    时间: 2013-11-3 15:51     标题: 【已解决】BAT怎样过滤特殊字符

本帖最后由 1270697389 于 2013-11-3 16:40 编辑

1.txt里有许多的问号(?),我想用批出里把它过滤掉,谢谢
作者: 522235677    时间: 2013-11-3 16:38

  1. @echo off & setlocal ENABLEDELAYEDEXPANSION
  2. for /f "delims=" %%i in (1.txt) do (
  3. set a=%%i
  4. set aa=!a:?=!
  5. echo !aa:_=!
  6. )
  7. pause
复制代码





欢迎光临 批处理之家 (http://bbs.bathome.net/) Powered by Discuz! 7.2