- @if(0)==(0) @echo off
- cd /d "%~dp0"
- for /d %%d in (*) do (
- pushd "%%d"
- for /f "delims=" %%i in ('dir /b /a-d "*.mp4"^|cscript /e:jscript /Nologo "%~f0"') do (
- popd
- ren "%%d" "%%d【%%i】"
- )
- )
- pause&exit
- @end
- objPlayer=new ActiveXObject("WMPlayer.OCX"),ws=WSH.stdin,durationInSeconds=0;
- while (!ws.atendofstream) {
- var filePath = ws.readline();
- var objMedia = objPlayer.newMedia(filePath);
- durationInSeconds += objMedia.duration
- }
- WScript.Echo(Math.ceil(durationInSeconds/60));
复制代码
|