function DelDirectory(const Source:string): boolean;<br>var<br> fo: TSHFILEOPSTRUCT;<br>begin<br> FillChar(fo, SizeOf(fo), 0);<br> with fo do<br> begin<br> Wnd := 0;<br> wFunc := FO_DELETE;<br> pFrom := PChar(source+#0);<br> pTo := #0#0;<br> fFlags := FOF_NOCONFIRMATION+FOF_SILENT;<br> end;<br> Result := (SHFileOperation(fo) = 0);<br>end;<br>