批量获取以序号命名的html,并以html文本里的标题重命名网页
下面是自己写的代码,速度较慢,怎么写快些呢?
—————————————————————- @echo off
- chcp 65001
- for /f "delims=" %%i in ('dir /a-d /b *.html') do (
- for /f "delims=" %%j in ('type %%i^|findstr /rc:"<title>"') do (
- for /f "tokens=2,3* delims=>_" %%a in ("%%j") do (
- ren "%%~nxi" "%%a%%~xi"
- )
- )
- )
- pause>nul
复制代码
|