调试通过:<br><br>uses<br> ShellAPI;<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br> myrec:TSHFILEOPSTRUCT ;<br>begin<br> with myrec do<br> begin<br> Wnd:= Handle;<br> wFunc:= FO_DELETE;<br> pFrom:= 'd:/tmp/*.*';<br> pTo:='';<br> fFlags:= FOF_NOCONFIRMATION or FOF_FILESONLY;<br> fAnyOperationsAborted:= False;<br> hNameMappings:= Nil;<br> lpszProgressTitle:= Nil;<br> end;<br> SHFileOperation(myrec);<br>end;