var<br> lsPath: string;<br> FileOp: TSHFileOpStruct;<br>begin<br> lsPath := 'c:/temp/';<br> //删除临时文件<br> with FileOp do begin<br> Wnd := 0;<br> wFunc := FO_DELETE;<br> pFrom := PChar(lsPath + '*.*' + #0); //取目录,与isFaq没有实际关系<br> pTo := nil;<br> fFlags := FOF_SILENT + FOF_NOCONFIRMATION ;<br> fAnyOperationsAborted := False;<br> hNameMappings := nil;<br> lpszProgressTitle := nil;<br> end;<br> SHFileOperation(FileOp);<br> <br> RemoveDir(lsPath );<br>end;