- Set FSO = CreateObject("Scripting.FileSystemObject")
- For Each FD in FSO.GetFolder(".").SubFolders
- Set Re = New RegExp
- Re.Pattern = "^([\u4e00-\u9fa5]+)([a-z ]+)$"
- Re.IgnoreCase = True
- For Each a in Re.Execute(FD.Name)
- FD.Name = a.SubMatches(1) & a.SubMatches(0)
- Next
- Set Re = Nothing
- Next
- MsgBox "OK"
复制代码 保存为test.vbs,与需要改名的文件夹放在一起,试一下 |