
附件 1:imw_1909_17963.rar (2008-9-7 21:46, 643 bytes,下载次数: 12)
CODE: [Copy to clipboard]至于你想找出所有这样的聊天记录,检查一下这样的文本文件名有没什么规律,比如文件名中都有"聊天"这两个字@echo off&setlocal enabledelayedexpansion
for /f "delims=" %%i in ('dir/b/a-d *.txt') do (
for /f "skip=2 eol== delims=" %%a in ('type %%i') do (
set a=%%a
set a=!a:1015=小李!
set a=!a:1017=小林!
set a=!a:1020=小张!
set a=!a: =!
set a=!a:~,-1!
if not "!a!"=="" echo !a! >>linshi.txt
)
)
pause
CODE: [Copy to clipboard]@echo off
setlocal enabledelayedexpansion
type nul>"AllChat.log"
for /f "delims=" %%a in ('dir /s /b /a-d *.txt') do (
for /f "usebackq eol== tokens=1*" %%i in ("%%a") do (
if "%%i" neq "" (
if "%%j" neq "" (
set a=%%i
set b=%%j
set a=!a:1015=小李!
set a=!a:1017=小林!
set a=!a:1020=小张!
set a=!a: =!
set b=!b:1015=小李!
set b=!b:1017=小林!
set b=!b:1020=小张!
set b=!b: =!
>>"AllChat.log" echo !a!!b!
)
)
)
>>"AllChat.log" echo -----------------------------------------------------
)
| Quote: | |
|
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |