dim fso
dim folder
dim files
dim i,ext
set fso = CreateObject("Scripting.FileSystemObject")
set folder = fso.getFolder("h:\test")'你要改名的目录
set files = folder.files
for each file in files
ext = right(file.name,4)
file.name = i & ext
i = i+1
next
没有做错误处理,只能运行一次,第二次会报错