Recurse Folder [RESOLVED]
Can you help me with a problem solver in Delphi please :)
Im trying to delete files from a folder (in my case the IE temp files). I know how to delete all files from a FileListbox, but how do you do it without this? I can use:
Code:
procedure TForm1.Button1Click(Sender: TObject);
var
i: Integer;
begin
for i:=0 to FileListBox1.Items.Count-1 do
DeleteFile(FileListBox1.Items[i]);
FileListBox1.Update;
end;
But thats not what i want, i just want to clean the IE temp crap :wave:
Thanks
Re: Delphi: Getting all files in a directory.
Thanks VisualAd, sorry for the non descriptive thread title :)
So does this link you posted delete the files in the folder, or just the folder?
Thanks again mate :thumb:
Re: Delphi: Getting all files in a directory.
A folder can only be deleted when empty, so it first deletes every file and directory inside the file recursivley and then deletes the folder.
Re: Delphi: Getting all files in a directory.