Delphi7.0中如何删除文件夹(带子目录和文件).docxVIP

  • 147
  • 0
  • 约1.32千字
  • 约 2页
  • 2021-11-08 发布于江苏
  • 举报

Delphi7.0中如何删除文件夹(带子目录和文件).docx

Delphi7.0中如何删除文件夹(带子目录和文件) 说明:先要在 USES 中输入:ShellApi; unit Unit1; interface uses Windows, Messages, SysUtilsa,riVants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Buttons,ShellApi; type TForm1 = class(TForm) BitBtn1: TBitBtn; procedure BitBtn1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} function DeletePath(mDirName: string): Boolean; { 返回删除指定目录是否成功 } var vSearchRec: TSearchRec; vPathName: string; K: Integer; begin Result := True; vPathName := mDirName + \*.*; K := FindFirst(vPathName, faAnyF

文档评论(0)

1亿VIP精品文档

相关文档