本帖最后由 apang 于 2012-12-12 21:30 编辑
保存为test.vbs,与mkv文件放在一起,试试- Set FSO = CreateObject("Scripting.FileSystemObject")
- For Each File in FSO.GetFolder(".").Files
- Ext = FSO.GetExtensionName(File)
- If LCase(Ext) = "mkv" Then RenFiles
- Next
- MsgBox "OK"
-
- Sub RenFiles()
- Set Re = New RegExp
- Re.Pattern = "(^.*\[)(\d{2})(\].*$)"
- Re.Global = True
- File.Name = Re.Replace(File.Name,"$2") & ".mkv"
- End Sub
复制代码
|