- @if (0)==(0) echo off
- dir /b *.ksc | cscript //nologo //e:jscript "%~f0"
- pause & exit
- @end
-
- var getContent = function(strFile){
- var n = strFile.replace(/(.+)\..+$/, '$1');
- var objFile = fso.OpenTextFile(strFile, 1);
- var s = objFile.ReadAll().replace(/^\/\/(?!\s*歌曲附加信息).*\n/mg, '');
- s = s.replace(/^(karaoke\.internalnumber *: *=)[^\r\n]*/im, '$1' + n + ';');
- s = s.replace(/^(karaoke\.CommonVideo *: *=)[^\r\n]*/im, "$1'" + n + "';");
- objFile.Close();
- fso.OpenTextFile(strFile, 2).Write(s);
- }
-
- var fso = new ActiveXObject('Scripting.FileSystemObject');
- while(!WSH.StdIn.AtEndOfStream) { getContent( WSH.StdIn.ReadLine()); }
复制代码
|