View Single Post
  #3  
Old 09-25-2021, 06:45
Stingered Stingered is offline
Friend
 
Join Date: Dec 2017
Posts: 160
Rept. Given: 0
Rept. Rcvd 1 Time in 1 Post
Thanks Given: 199
Thanks Rcvd at 103 Times in 52 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