
| Quote: | |
|
CODE: [Copy to clipboard]不知道哪位高手能帮忙指点一二,优化下@echo off
setlocal
for /f "tokens=1,* delims=:" %%a in ('findstr /n /c:"分隔符" test.txt') do (
set line=%%a
)
set num=0
setlocal enabledelayedexpansion
for /f "skip=%line% delims=" %%i in (test.txt) do (
set /a num+=1
set var=%%i
if !num! equ 1 echo !var:~7,3!>>num.txt
)
endlocal
CODE: [Copy to clipboard]@Echo off&SetLocal EnableDelayedExpansion
for /f "delims=" %%a in ('findstr ">.*<" ko_.html') do (
set "string=%%a"
set "string=!string:>=\!"&set "string=!string:<=\!"
if defined lxmxn (set "lxmxn="&&call :printf "!string!") else (echo !string!|find "总帖数" >nul 2>nul&&set lxmxn=cn-dos)
)
:end
pause&exit/b
:printf
set hello=%~1
for /f "tokens=2 delims=\" %%i in ("%hello%") do echo %%i
exit/b
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |