
CODE: [Copy to clipboard]for /f "delims=:" %%i in ('findstr /x /n "1234567" abc.txt') do type abc.txt | more +%%i >aaa.txt
CODE: [Copy to clipboard]@echo off
set /p fn=输入文件路径(可拖进来):
for /f "delims=:" %%i in ('findstr /x /n "1234567" "%fn%"') do (
type "%fn%" | more +%%i >aaa.txt
)
pause
CODE: [Copy to clipboard]for /f "delims=:" %%i in ('findstr /x /n "1234567" "%~s1"') do type "%~s1" | more +%%i >aaa.txt
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |