本帖最后由 xp3000 于 2022-10-16 18:24 编辑
- @if (0)==(0) echo off
-
- dir /b *.ape *.flac *.wav *.mp3 | cscript -nologo -e:jscript "%~0"
- pause&exit/b
- @end
-
- fso = new ActiveXObject("Scripting.FileSystemObject");
- while (!WSH.StdIn.AtEndOfStream) {
- line = WSH.StdIn.ReadLine();
- f=fso.GetFile(line);
- s1= line.replace(/^(.{3})[^\.]+\..+$/mg, '$1').replace(/#/mg, '');
- s2= line.replace(/^.{3}([^\.]+\..+)$/mg, '$1').replace(/-[^\.]{6}/g, '-');
- if(fso.FileExists(s1+s2))
- WScript.Echo('\n文件: ' +line+'命名失败!\n')
- else
- f.Move(s1+s2);
- }
复制代码
|