- /*&cls
- @echo off
- set info=互助互利,支付宝扫码头像,感谢打赏
- rem 有问题,可加QQ956535081及时沟通
- title %info%
- set "folder=C:\Users\Administrator\Desktop\Test"
- if not exist "%folder%" (echo;"%folder%" not found&goto end)
- for /f "tokens=1* delims=|" %%a in ('dir /a-d/b/s "%folder%\*.jpg"^|cscript -nologo -e:jscript "%~f0"') do (
- echo;[%%a]"%%b"
- nconvert.exe -overwrite -rotate 90 "%%b"
- )
- :end
- echo;%info%
- pause
- exit
- */
- var sa=new ActiveXObject('Shell.Application');
- var fso=new ActiveXObject('Scripting.FileSystemObject');
- var objFolder=sa.NameSpace(0);
- var s=0;
- for(var i=0;i<400;i++){if(objFolder.GetDetailsOf(null, i) == '尺寸'){s=i;break;}}
- if(s==0){WSH.StdErr.WriteLine('no match');WSH.Quit();}
- while(!WSH.StdIn.AtEndOfStream){
- var f=fso.GetFile(WSH.StdIn.ReadLine());
- var objFolder=sa.NameSpace(f.ParentFolder.Path);
- var objItem=objFolder.ParseName(f.Name);
- var size=objFolder.GetDetailsOf(objItem, i).match(/\d+/g);
- if(size){
- if(Number(size[0]) > Number(size[1])){
- WSH.Echo(size.join('x')+ '|' +f.Path);
- }
- }
- }
复制代码
|