Вниз
Скачать: CL | DM;

Как программно создать и удалить папку?   Найти похожие ветки 

← →
Максим   (2004-07-03 06:42) [0]

Как программно создать и удалить папку?


← →
TUser ©   (2004-07-03 07:16) [1]

MkDir, ForceDirectories


← →
армен   (2004-07-03 09:32) [2]

А пример если можно


← →
Andy BitOff ©   (2004-07-03 09:45) [3]

А в справке посмотреть сложно?

MkDir

uses Dialogs;
begin

 {$I-}
 { Get directory name from TEdit control }
 MkDir(Edit1.Text);
 if IOResult <> 0 then
   MessageDlg("Cannot create directory", mtWarning, [mbOk], 0, mbOk)
 else
   MessageDlg("New directory created", mtInformation, [mbOk], 0, mbOk);
end;


ForceDirectories

This example uses a label and a button on a form. When the user clicks the button, all the directories along the specified path that don"t exist are created. The results are reported in the caption of the label:

procedure TForm1.Button1Click(Sender: TObject);

var
 Dir: string;
begin

 Dir := "C:\APPS\SALES\LOCAL";

 if ForceDirectories(Dir) then
   Label1.Caption := Dir + " was created"

end;


← →
begin...end ©   (2004-07-03 10:58) [4]


> [3] Andy BitOff ©   (03.07.04 09:45)


> MkDir


...
{$I+}
end;


Весьма желательно :)


← →
Cardinal ©   (2004-07-03 15:16) [5]

А можно CreateDirectory и RemoveDirectory.


← →
Andy BitOff ©   (2004-07-03 17:48) [6]


>begin...end ©   (03.07.04 10:58) [4]


Вообщет-то да :)
Но я из хелпа скопировал даже не посмотрев.


← →
Максим   (2004-07-06 08:49) [7]

Мужики не получается ни RemoveDir ни ForceDirectories. Мне надо, чтобы удалялась конкретная папка с содержащимися в ней файлами.


← →
Iconka ©   (2004-07-06 09:22) [8]

Может нужно в начале удалить файлы, а потом папку?



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.46 MB
Время: 0.02 c
8-1083186234
Zeon
2004-04-29 01:03
2004.07.18
Запись звука


1-1088631701
HF-Trade
2004-07-01 01:41
2004.07.18
Скролинг


9-1080631713
Michael Makushev
2004-03-30 11:28
2004.07.18
GLScene - is dead?


1-1087807856
GrayFace
2004-06-21 12:50
2004.07.18
Assembler


14-1087550306
Rule
2004-06-18 13:18
2004.07.18
Я только что защитил диплом !!!!!!!!!!!!!!!!!!!




   Наверх