Wednesday, April 21, 2010

Delete all files in the Temporary Files In Browser

Delete temp internet files in browser. manually we can do it with below navigation (IE 6).
Tools - - > Internet Options --> General - - > Temporary Internet files section - - click on "Delete Files .." button --> turn on " Delete all offline content" check box --> Click "OK" Button -- > Click "OK" Button

Above steps we can do with Below QTP code

Const TEMP_INET_FILES = &H20&
Set oShell = CreateObject("Shell.Application")
Set oFolder = oShell.Namespace(TEMP_INET_FILES)
Set oFolderItem = oFolder.Self
FolderPath = oFolderItem.Path & "\*.*"
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile(FolderPath)

No comments:

Post a Comment