这样效率会提升点吗- @if(0)==(0) echo off & setlocal enabledelayedexpansion
- for %%i in (1.jpg,2.jpg,3.jpg,4.jpg,15.jpg,16.jpg) do set "$%%i=1000x1200"
- for %%i in (5.jpg,7.jpg) do set "$%%i=200x300"
- for %%i in (1.jpg,2.jpg,3.jpg,4.jpg,5.jpg,7.jpg,15.jpg,16.jpg) do (
- for /f "tokens=1*" %%a in ('dir /b /s /a-d %%i 2^>nul^|cscript -NoLogo -E:JScript %0') do (
- if "%%b" neq "" (
- if "%%a" neq "!$%%i!" >>err.txt echo;%%b
- ) else set "n=%%a"
- )
- echo;%%i 共 !n! 张
- )
- pause&exit
-
- @end
- var s = "",l=0
- while(!WScript.StdIn.AtEndOfStream){
- var Img = new ActiveXObject("WIA.ImageFile")
- var file = WScript.StdIn.ReadLine();
- Img.LoadFile(file);
- WSH.Echo(Img.Width + "x" + Img.Height + ' ' + file);
- l++
- }
- WSH.Echo(l);
复制代码
|