- @set @n=0; /* &echo off&dir /a-d /b /s *.m4a 2>nul|cscript -nologo -e:jscript "%~0"&pause & exit & rem */
- var objShell = new ActiveXObject("Shell.Application");
- var fso = new ActiveXObject('Scripting.FileSystemObject')
- var objFolder = objShell.NameSpace(0);
- var i = 0;
- while(true) {if (objFolder.GetDetailsOf(null, i) == "标题") {break} else i++;}
- while(!WScript.StdIn.AtEndOfStream) {
- var file = WScript.StdIn.ReadLine();
- var m = file.match(/^(.+)\\(.+(\.[a-zA-Z0-9]{2,4}))$/i);
- var objFolder = objShell.NameSpace(m[1]);
- var objItem = objFolder.ParseName(m[2]);
- var v = objFolder.GetDetailsOf(objItem, i);
- var f = fso.GetFile(file);
- if (v) {f.Move(v+m[3]);}
- }
复制代码
|