‘批量修改文件后缀名
Function GetScriptPath()
  GetScriptPath = Left(WScript.ScriptFullName, Len(WScript.ScriptFullName) - Len(WScript.ScriptName))
End Function
Dim before : before = InputBox("请输入要修改的文件后缀名:","用户输入") ‘获取用户输入的前缀
Dim suffix : suffix = InputBox("请输入修改后的文件后缀名:","用户输入") ‘获取用户输入的后缀
Dim getReturn 
getReturn = MsgBox("确定要更改名称?", vbInformation + vbOKCancel, "警告提示")
if getReturn = vbOK then	
 	‘复制文件夹
	set ws=wscript.createobject("wscript.shell")
	Dim path :path = GetScriptPath()
	ws.run"cmd " & path
	‘修改后缀
	ws.run "cmd /c ren *." & before  & " *." & suffix 
	dim word : word = "exit %s"
	CreateObject("WScript.Shell").Run "taskkill /f /im cmd.exe", 0
end if
CreateObject("WScript.Shell").Run "taskkill /f /im 文件名", 0CreateObject("WScript.Shell").Run "taskkill /f /im cmd.exe", 0原文:https://www.cnblogs.com/MrFlySand/p/15176845.html