test.vbs- Dim fso
- Set fso = CreateObject("Scripting.FileSystemObject")
- Set ThisFolder=fso.GetFolder(".")
- For Each file In thisfolder.Files
- FileBaseName=fso.GetBaseName(File.Name)
- FileExtName=fso.GetExtensionName(File.Name)
-
- [判断] = True
- While [判断]
- If Clng("&H" & Hex(Asc(Right(FileBaseName,1)))) > 255 Then
- FileBaseName=Left(FileBaseName,Len(FileBaseName)-1)
- Else
- [判断]=False
- End If
- Wend
-
- fso.MoveFile file.Path,file.ParentFolder&"\"&FileBaseName&"."&FileExtName
- Next
复制代码
|