Hi
I am using the following code to delete a large number of files
function FastDelete(const fromDir: string): Boolean;
var
fos: TSHFileOpStruct;
begin
ZeroMemory(@fos, SizeOf(fos));
with fos do
begin
wFunc := FO_DELETE;
fFlags := FOF_FILESONLY or
FOF_NOCONFIRMATION or
FOF_NO_CONNECTED_ELEMENTS or
FOF_NOERRORUI or
FOF_NO_UI;
pFrom := PChar(fromDir+'\*.*' + #0);
end;
Result := (0 = ShFileOperation(fos));
end;
How do I get it to recursively delete all the files in the path?
EDIT
The problem is the FOF_FILESONLY flag After removing it files are recursively deleted