Autor Beitrag
JRegier
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1268

Win XP Home, Prof, 2003 Server
D6 Enterprise
BeitragVerfasst: Mi 13.07.05 07:25 
Hallo, ich will mit meinem Programm Verzeichnisse anlegen aber es klappt nicht!

Was mache ich falsch? siehe Code:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
ApplicationDirectory := ExtractFileDir(Application.Exename);
ProjektDirectory := ApplicationDirectory+'\Projekte';

procedure CreateProjektDirectories(ProjektName : String);
begin

if (CreateDir(ProjektDirectory+'\'+ProjektName)) and
(CreateDir(ProjektDirectory+'\'+ProjektName+'\images')) and
(CreateDir(ProjektDirectory+'\'+ProjektName+'\RecordData'))then else
ShowMessage('Fehler beim Erstellen der Projektverzeichnisse!');

end;


Mir fällt gerade ein muß eigentlich das Projekte Verzeichnis vorhanden sein oder müßte er ganzen Pfad erstellen können?
mirom
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 56

Win2000, Win XP

BeitragVerfasst: Mi 13.07.05 07:39 
versuche mit ForceDirectories:

www.delphibasics.co....ame=ForceDirectories

_________________
Miro M.
< meine Rechtschreibfehler sind unabsichtlich>
Chatfix
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1583
Erhaltene Danke: 10

Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
BeitragVerfasst: Mi 13.07.05 07:42 
Wenn ich mich recht erinnere kann man mit CreateDir keine Verzeichnisstruktur anlegen.
Du müsstest also jedes verzeichnis einzeln anlegen.
Vielleicht liegt ja da das Problem.

Korrigiert mich falls ich irre.

_________________
Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 13.07.05 07:44 
Das stimmt. Der Link von mirom sollte aber helfen.
JRegier Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1268

Win XP Home, Prof, 2003 Server
D6 Enterprise
BeitragVerfasst: Mi 13.07.05 07:51 
user profile iconjasocul hat folgendes geschrieben:
Das stimmt. Der Link von mirom sollte aber helfen.


Ihr seid ja Flott beim Antworten, Danke!
, ja wie ich oben auf den Gedanken gekommen bin dass das "Projekte" Verzeichniss schon vorhanden sein muß!

Ein moment ich versuche es... Ah super klappt!