你这个标题应该改为 将子文件夹里的图片生成网页链接
刚注册,好好学。- @echo off
- del indexHY图.html>nul 2>nul
- cls
- echo 正在生成链接
- for /f "delims=" %%a in ('dir/b/on/ad') do (
- set /a p=0
- echo 正在生成%%a的图片链接
- echo.
- cd "%%a"
- del *.html>nul 2>nul
- echo ^<center^>^<h1^>%%a^<br^>生成时间 %date% %time%^</h1^>^</center^>>%%a.html
- echo ^<style type="text/css"^>^<!--.style7 {font-size: 50px} body,td,th {color: #FF0000;} body {background-color: #000000;}--^>^</style^>^<p align="center"^>^<strong^>>>%%a.html
-
- for /f "delims=" %%i in ('dir/b/on/a-d *.jp*g 2^>nul') do echo ^<img src="%%i" border="0"^>^<BR^>%%i^<BR^>^<BR^>>>%%a.html
- echo ^</strong^>^</p^>>>%%a.html
- cd..)
- echo 正在生成总链接 indexHY.html
- echo ^<b^>展示当前第一子文件夹层内的图片-生成时间 %date% %time%^</b^>^<hr^>>index.txt
- for /f "delims=" %%b in ('dir/b/s/on/a-d *.html 2^>nul') do echo ^<a href="%%~fb" target^=^"^_blank^"^>%%~nb^</a^>^</br^>>>index.txt
- ren index.txt indexHY图.html
- exit
复制代码 对所有子文件夹里的 jpg jpeg 图片生成链接网页 |