Autor Beitrag
Cosmic
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 63



BeitragVerfasst: Mo 13.01.03 15:44 
Hallo :-)
ich versuche eine Aktion davon abhängig zu machen, ob eine bestimmte Datei vorhanden ist oder nicht. Der Ordner in dem die Datei sein sollte wird via SelectDirectory gewählt.
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
if SelectDirectory(Dir, [sdAllowCreate, sdPerformCreate,   
sdPrompt],SELDIRHELP) then 
 Begin 
  If FileExists((Dir+'valid')) then //hier stimmt was nicht
  Begin 
      ........

Der Befehl FileExists findet die Datei nie?!
Dir ist der Übergabewert von Selectdirectory, und in dem ausgewählten Verzeichnis soll dann die Datei sein. Die Datei enthält keine Information. Lediglich das Vorhandensein soll geprüft werden. Der Name der Datei Valid.Bug kann aber auch beliebig anders heißen...

Wo ist der Syntaxfehler bei der IF FileExists abfrage ???
Kann mir jemand helfen?

Gruß Cosmic

-----------------------------------------
Letz Fet´s heute beginnt Dein Leben
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Mo 13.01.03 16:29 
du musst bei der fileexistsabfrage den vollständigen Pfad und den vollständigen Dateinamen angeben!!
wenn die datei valid.bug heißt musst du das auch hinschreiben!!!



Fiji-Fighter
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Mo 13.01.03 16:35 
außerdem musst du noch den backslash einfügen!

ausblenden Quelltext
1:
iffileexists(...+'\valid.bug') then					


Fiji-Fighter
Cosmic Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 63



BeitragVerfasst: Di 14.01.03 09:07 
Titel: Klasse
Hi!
Klasse danke für Deine Hilfe!
Der blöde Backlash fehlte :oops:
Ansonsten klappt es jetzt :-)

Ciao Cosmic

-----------------------------------------
Lets Fet´z heute beginnt Dein Leben