Autor Beitrag
gbst51sc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 56

Windows XP
Delphi 7.0 Enterprise, Delphi 2005 Personal
BeitragVerfasst: Mi 19.07.06 10:58 
ich habe das problem, dass ich in einem unterordner meiner exe eine txtdatei haben will. wird sie nicht gefunden, soll sie angelegt werden. nun gibt es 2 fälle:

1. unterordner existiert, datei nicht
2. unterordner existiert nicht

wie kann ich das nun testen, ob er existiert? weil mkdir(unterdatei) klappt nur wenn der ordner nicht da ist und savetofile klappt nur, wenn der unterordner vorhanden ist.

hat jemand ne idee?
Robert.Wachtel
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 895
Erhaltene Danke: 7

Windows 7 Ultimate x64
D5 Ent, D7 Arch, RAD Studio 2010 Pro, VS 2008
BeitragVerfasst: Mi 19.07.06 11:03 
ausblenden Delphi-Quelltext
1:
2:
if SysUtils.DirectoryExists(meinDir) or SysUtils.ForceDirectories(meinDir) then
  SpeicherMeineDatei;