Delphi 支持通配符删除文件
2022-09-30 09:11:52 作者:admin
本文整理自网络,侵删。
procedure DeleteFileEx(FileName:string);
var
FileDir:string;
FileStruct:TSHFileOpStruct;
begin
FileDir := FileName;// 'C:\temp\abc*.txt';
FileStruct.Wnd :=0;
FileStruct.wFunc :=FO_delete;
FileStruct.pFrom:=Pchar(FileDir+#0);
FileStruct.fFlags:=FOF_NOCONFIRMATION;
FileStruct.pTo := ' ';
// if SHFileOperation(FileStruct)=0 then
// showmessage( 'The Files Has Been Deleted! ');
end;
猜你喜欢
联络方式:
400-123-789
邮箱:xiachao@163.com
Q Q:12345678
微信公众号
微信二维码