就是那种很直白的转换,写一句话也可以变成网页
上代码吧:
@echo off set utf8=65001 set ansi=936 chcp %utf8% for /f "delims=" %%i in ('dir /b *.txt') do ( findstr /n .* "%%i" >.tmp ( echo ^echo ^echo ^echo ^echo ^setlocal enabledelayedexpansion for /f "delims=" %%i in ('dir /b /s /a-d *.tmp') do ( set /p Str=!str:*:=!^ ) EndLocal echo ^echo ^setlocal enabledelayedexpansion for /r %%a in (*.tmp) do ( set /p Str=!str:*:=!^ ) EndLocal for /f "skip=1 delims=" %%i in (.tmp) do ( set str=%%i SetLocal EnableDelayedExpansion echo !str:*:=!^EndLocal ) echo ^echo ^) > %%~ni.html ) del .tmp
试试吧 一个目录下的txt都会遭殃,注意安全!
后缀名为bat,改后双击,开始开心!