Witam
Mamy webbrowser i jak usunąć z niego wszystkie ciasteczka lub całego Temporary Internet Files.
Wszystko co znalazłem szukając to tylko jak pobrać cookies oraz to do usuwania, ale jakoś nie chce usuwać(funkcja działa na zwykłych folderach) DeleteDirectory('C:','Documents and Settings\Paweł\Ustawienia lokalne\Temporary Internet Files');
//---------------------------------------------------------------------------
function DeleteDirectory( dir, path : string) : Boolean;
var
SR : TSearchRec;
Found : Integer;
source : String;
begin
source := dir + path;
Found := FindFirst( source+'\*.*', faAnyFile, SR );
try
while (Found = 0) do
begin
if (SR.Name<>'.') and (SR.Name <> '..') then
begin
if (SR.Attr and faDirectory) <> 0 then
begin
DeleteDirectory( dir, path+'\'+SR.Name );
end
else
begin
FileSetAttr(
source+'\'+SR.Name, FileGetAttr(source+'\'+SR.Name)
and
not (faReadOnly or faHidden) );
if not DeleteFile( source+'\'+SR.Name ) then
Result := False;
end;
end;
Found := FindNext( SR );
end;
finally
FindClose(SR);
end;
RemoveDir( source );
end;
//---------------------------------------------------------------------------