|
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 topics
-
Recognize whether Word is installed
Find out total size of directory
Remove all files from directory
- For more
-
Delphi Help
- Download source
|