I use this procedure:
function MoveToRecycle(sFileName: widestring): Boolean;
var
fos: TSHFileOpStructW;
begin
FillChar(fos, SizeOf(fos), 0);
with fos do
begin
wnd := 0;
wFunc := FO_DELETE;
pFrom := PWideChar(sFileName + #0 + #0);
pTo := #0 + #0;
fFlags := FOF_FILESONLY or FOF_ALLOWUNDO or FOF_NOCONFIRMATION or FOF_SILENT;
end;
Result := (ShFileOperationW(fos) = 0);
end;
What will happen if the recycle bin is full, does it return false or delete file permanently ?
Any help would be appreciated.