假设图片已放入images目录中- @echo off
- setlocal enableDelayedExpansion
-
- set "file_start=<HTML><HEAD></HEAD><BODY>"
- set "image_start=<P align=center><IMG SRC="
- set "image_end= class="image"/></P>"
- set "file_end=</BODY></HTML>"
-
- for /r images %%i in (*.jpg *.bmp *.gif *.png)do (
- (
- echo !file_start!
- echo !image_start!"images/%%~nxi"!image_end!
- echo !file_end!
- )>"%%~ni.html"
- )
复制代码
|