[No0000D7]img生成器.bat合并所有图片到html网页中

@ECHO OFF
IF EXIST %~nx0.html DEL /F /Q %~nx0.html
ECHO ^<html^>^<head^>^<title^>%~nx0^</title^>^</head^>^<body style="background:black;" onload="window.setInterval(function(){window.scrollBy(0,800);},800);" ^>  >>%~nx0.html
FOR /F %%I IN ('DIR /B /O') DO (
IF /I %%I NEQ %~nx0 ( 
    IF /I %%I NEQ %~nx0.html (
::        ECHO ^<img width="500px" onmouseover="this.style.width=this.naturalWidth;" onclick="javascript:window.open(this.src);" onmouseout="this.style.width='500px';" src="%%I"^> >>%~nx0.html
        ECHO ^<img width="49.5%%" onclick="javascript:window.open(this.src);" src="%%I"^> >>%~nx0.html
    )
)
)
ECHO ^</body^>^</html^>  >>%~nx0.html

把同路径下的所有文件创建一个html,以方便在浏览器中全局浏览。

posted @ 2017-04-01 11:11  CharyGao  阅读(515)  评论(0编辑  收藏  举报