|
-
May 25th, 2005, 02:49 PM
#1
Thread Starter
Supreme User
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 
Thanks
Last edited by Madboy; May 26th, 2005 at 05:33 AM.
-
May 25th, 2005, 03:29 PM
#2
Not NoteMe
Re: VisualAd....
Surely that would depend on how you populate the listbox in the first place.
Change the code so that instead of adding the file to the listbox you delete it.
Or is there some function to get the listbox to automatically list files??
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
-
May 25th, 2005, 04:06 PM
#3
-
May 25th, 2005, 04:59 PM
#4
Thread Starter
Supreme User
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
-
May 25th, 2005, 05:16 PM
#5
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.
-
May 26th, 2005, 05:32 AM
#6
Thread Starter
Supreme User
Re: Delphi: Getting all files in a directory.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|