View Single Post
  #3  
Old 09-25-2021, 06:45
Stingered Stingered is offline
Friend
 
Join Date: Dec 2017
Posts: 256
Rept. Given: 0
Rept. Rcvd 2 Times in 2 Posts
Thanks Given: 296
Thanks Rcvd at 179 Times in 89 Posts
Stingered Reputation: 2
There is an old tool by Nirsoft, called IEcacheview.exe (has delete option). May help you find and delete files.

https://www.nirsoft.net/utils/ie_cache_viewer.html

You can also do this programmatically (code and tool):

https://www.codeproject.com/Articles/15319/A-Cleanup-API-for-Windows

And just code (Delphi):

Quote:
Procedure ClearIECache;
Var
lpEntryInfo : PInternetCacheEntryInfo;
hCacheDir : LongWord;
dwEntrySize : LongWord;
dwLastError : LongWord;
Begin
dwEntrySize := 0;
FindFirstUrlCacheEntry( NIL, TInternetCacheEntryInfo( NIL^ ), dwEntrySize );
GetMem( lpEntryInfo, dwEntrySize );
hCacheDir := FindFirstUrlCacheEntry( NIL, lpEntryInfo^, dwEntrySize );
If ( hCacheDir 0 ) Then
DeleteUrlCacheEntry( lpEntryInfo^.lpszSourceUrlName );
FreeMem( lpEntryInfo );
Repeat
dwEntrySize := 0;
FindNextUrlCacheEntry( hCacheDir, TInternetCacheEntryInfo( NIL^ ), dwEntrySize );
dwLastError := GetLastError;
If ( GetLastError = ERROR_INSUFFICIENT_BUFFER ) Then Begin
GetMem( lpEntryInfo, dwEntrySize );
If ( FindNextUrlCacheEntry( hCacheDir, lpEntryInfo^, dwEntrySize ) ) Then
DeleteUrlCacheEntry( lpEntryInfo^.lpszSourceUrlName );
FreeMem(lpEntryInfo);
End;
Until ( dwLastError = ERROR_NO_MORE_ITEMS );
End;
Reply With Quote