首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

VBS兑现一个过去的需求

2012-10-24 
VBS实现一个过去的需求MoveTXT C:\Develop\Windows Dev,C:\Develop\Windows Dev\Process\Function Mov

VBS实现一个过去的需求

MoveTXT "C:\Develop\Windows Dev","C:\Develop\Windows Dev\Process"Function MoveTXT(sSource, sTarget)Set fso = CreateObject("Scripting.FileSystemObject")For Each file in fso.GetFolder(sSource).Files If fso.GetExtensionName(file) = "trg" Then  txtFile = sSource & "" & fso.GetBaseName(file) & ".txt"  If fso.FileExists(txtFile) Then   fso.MoveFile txtFile,sTarget   fso.DeleteFile sSource & "" & fso.GetBaseName(file) & ".trg"  End If End IfNextEnd Function

热点排行