|
|
导航: |
论坛 -> DELPHI技术
斑竹:liumazi,sephil |
|
作者: |
|
2003/12/2 11:01:40 |
标题: |
|
加入我的收藏 |
楼主: |
如何在DELPHI中判断一个文件夹存在与否?? 如果不存在,我想创建它??如何实现??谢谢各位
----------------------------------------------
- |
作者: |
bios (阿贡) |
★☆☆☆☆ |
-
|
盒子中级会员 |
|
2003/12/2 11:04:32 |
1楼: |
if not DirectoryExists('c:\temp') then if not CreateDir('C:\temp') then raise Exception.Create('Cannot create c:\temp');
----------------------------------------------
|
作者: |
bios (阿贡) |
★☆☆☆☆ |
-
|
盒子中级会员 |
|
2003/12/2 11:17:06 |
2楼: |
procedure TForm1.Button1Click(Sender: TObject);
var Dir: string; begin
Dir := 'C:\APPS\SALES\LOCAL';
if ForceDirectories(Dir) then Label1.Caption := Dir + ' was created'
end;
----------------------------------------------
|
|