vbs常用函数
aa
'删除文件夹 sub DeleteFolder(objFolder) call OutputLog(objFolder.Path,true) err.Clear On Error Resume Next objFolder.attributes=0 objFolder.delete On Error Goto 0 if Err.Number then Msgbox "删除文件夹[" & objFolder.Path & "]失败" & vbcrlf & Err.Description end if end sub
'删除文件 sub DeleteFile(objFile) 'call OutputLog(objFile.Path,false) err.Clear On Error Resume Next objFile.attributes=0 objFile.delete On Error Goto 0 if Err.Number then Msgbox "删除文件[" & objFolder.Path & "]失败" & vbcrlf & Err.Description end if end sub