返回列表 发帖

[问题求助] VBS能否删除开始----文档里抽历史记录?

VBS能否删除开始----文档里抽历史记录?
C:\Documents and Settings\Administrator\Recent

Recent文件夹是隐藏的!

回复 2# batman

谢谢,能删除!
但我将
C:\Documents and Settings\Administrator\Recent
换成
C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files

为什么不能删除上网历史记录呢?

TOP

本帖最后由 ww0000 于 2013-9-6 08:14 编辑

这个网上找的,也不行
On error resume Next
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment("Process")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Const DeleteReadOnly = TRUE
  objFSO.DeleteFile(WshSysEnv("userprofile") & "\Local Settings\Temporary Internet Files\*.*"), DeleteReadOnly
  objFSO.DeleteFile(WshSysEnv("userprofile") & "\Local Settings\Temp\*.*"),DeleteReadOnly            
   ShowSubFolders objFSO.GetFolder(WshSysEnv("userprofile") & "\Local Settings\Temporary Internet Files\")
   ShowSubFolders objFSO.GetFolder(WshSysEnv("userprofile") & "\Local Settings\Temp\")                     
Sub ShowSubFolders(Folder)
  For Each Subfolder in Folder.SubFolders
    objFSO.DeleteFile(Subfolder.Path & "\*.*"), DeleteReadOnly
  ShowSubFolders Subfolder
  Next
End SubCOPY

TOP

返回列表