如何在工程目录下创建一个文件夹(判断有就不创建,没有该文件夹就创建),谢谢高手了!
解决方案 »
- 如何做到象qq的聊天窗口那样的可以单独弹出?
- 如何获得系统中运行的所有窗口
- 问一个sql简单问题
- 新手的问题!!!!Image1.Picture.LOadfromFile('aa.jpeg');
- 关于BLOB的读写问题!
- 窗口的问题!!在线,解决即结帐!
- delphi5编译dll为什么不能在PB中调用出错
- Delphi中如何操作Word的复选框窗体,简单问题,50分求教
- 如何拷贝一个树的节点,及其下属节点,到另一个TreeView的一个节点中呢?
- 有能够将exe和dll(或几个exe)打包成一个可执行文件的工具吗?
- 用FAST REPORT做报表出现异常问题
- 救急!在线等待!StringGrid控件的事件问题!
begin
{$I-}
MkDir(ExtractFileDir(Application.ExeName) + '\Log' );
if IOResult <> 0 then
MessageDlg('Cannot create directory', mtWarning, [mbOk], 0, mbOk)
else
MessageDlg('New directory created', mtInformation, [mbOk], 0, mbOk);
end;
DirectoryExists(‘文件夹的路径’)
2.如果不存在则创建:
CreateDir('新建的文件夹路径和名称')
ForceDirectories('c:\abcd');
if not directoryexists(frootpath+modulname) then
createdir(FRootPath+modulname);
if not DirectoryExists(FRootPath+modulname+'\'+pathname) then
createdir(FRootPath+modulname+'\'+pathname);
if not directoryexists(FRootPath+modulname+'\'+pathname+'\'+dirname) then
createdir(FRootPath+modulname+'\'+pathname+'\'+dirname);
if filepath<>'' then
if not directoryexists(FRootPath+modulname+'\'+pathname+'\'+dirname+'\'+filepath) then
createdir(FRootPath+modulname+'\'+pathname+'\'+dirname+'\'+filepath)
except
On E:Exception do begin
abort;
end;
end;