
CODE: [Copy to clipboard]@echo off
set "str=主机名 注册的所有人 初始安装日期"
findstr /r "%str%" test.txt>te.txt
CODE: [Copy to clipboard][ Last edited by zw19750516 on 2008-4-15 at 07:46 PM ]@echo off&setlocal enabledelayedexpansion
for /f "tokens=1*" %%i in (test.txt) do (
set /a n+=1
for %%i in (1,7,10) do if %%i equ !n! echo %%j>>te.txt
)
pause
CODE: [Copy to clipboard]@echo off
set "str=主机名 注册的所有人 初始安装日期"
for /f "tokens=1*" %%i in ('findstr /r "%str%" test.txt') do echo %%j>>te.txt
pause
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |