![]() |
Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming! |
⤷ Delete all files within directory
Use FileListBox component. Specify a necessary directory to this component and remove files by using DeleteFile procedure.
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;
- Related components
- TFileSearch
- TFolderMonitor
- TFileVersion
-
More for developers