Sub deleteInternetCache() Dim path As String = Environment.GetFolderPath(Environment.SpecialFolder.InternetCache) Dim di As New IO.DirectoryInfo(path) On Error Resume Next For Each file As IO.FileInfo In di.GetFiles file.Delete() Next For Each dir As IO.DirectoryInfo In di.GetDirectories dir.Delete(True) NextEnd Sub