摘要:
procedure TForm1.Button1Click(Sender: TObject);varPach:string;beginPach:='E:\123\223'; //定义目录地址if not DirectoryExists(pach) then //查找文件夹是否存在 begin //建立文件夹(ForceDirectories可建立多级目录,创建单级目录用:CreateDirectory) ForceDirectories(Pach); endelse begin showmessage('目录已经存在'); end;end; 阅读全文