'批量改文件名 ReNameFiles.vbs
'防止出现错误
On Error Resume Next
'vbs代码开始----------------------------------------------
Set fso = CreateObject("Scripting.FileSystemObject")
Set ws =createobject("wscript.shell")
Dim path,extName,destFileName
Dim nCount '文件计数
Dim perName '前缀名
Dim nLen '文件名数字变量的位数 examp: Pic00123.jpg nLen=5
'初始化变量
nCount=1
perName="Pic" '自己看着改
nLen=4
path=szGetThisPath
Dim extArray
'要处理的图片类型
extArray=Array(".jpg",".bmp",".png",".gif",".tag",".psd")
Dim tmpCount
tmpCount=UBound(extArray)
set files=fso.getfolder(path)
for each thing in files.files'文件的枚举
Do
If StrComp(thing.name,Wscript.ScriptName)=0 Then '如果文件名=本脚本名,跳过,不改
Exit Do
End If
extName&#