Autor Beitrag
IhopeonlyReader
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 600
Erhaltene Danke: 23


Delphi 7 PE
BeitragVerfasst: Mi 02.05.12 22:24 
Hi,
ich hab eine Frage dazu, warum hier IMMER (egal welcher Pfad) immer Existiert nicht ausgegeben wird?

ausblenden Delphi-Quelltext
1:
if FileExists('C:\'then showmessage('Exisitiert'else showmessage('Existiert nicht');					


(Ja es gibt C:\)
Liegt es vielleicht daran, dass es ein String ist? (Das ganze steht in Formcreate)

Freu mich auf eure Lösungsvorschläge... ;)

Moderiert von user profile iconNarses: Titel korrigiert.
Lemmy
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 792
Erhaltene Danke: 49

Windows 7 / 10; CentOS 7; LinuxMint
Delphi 7-XE10.1, VS 2015
BeitragVerfasst: Mi 02.05.12 22:31 
Hi,

Gegenfrage: Ist C:\ eine Datei? Wenn das keine Datei ist, warum sollte dann FileExists true zurück liefern? SChon mal DirectoryExists probiert?

Grüße
IhopeonlyReader Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 600
Erhaltene Danke: 23


Delphi 7 PE
BeitragVerfasst: Mi 02.05.12 22:38 
user profile iconLemmy hat folgendes geschrieben Zum zitierten Posting springen:
Hi,

Gegenfrage: Ist C:\ eine Datei? Wenn das keine Datei ist, warum sollte dann FileExists true zurück liefern? SChon mal DirectoryExists probiert?

Grüße


DirectoryExists(C:\) ist richtig ;) bin gerade Selber drauf gekommen :D als ich es mit einem Opendialog probierte klappte es immer^^ (FileExists) aber nur Verzeichnisse Nie :D da googelte ich glatt mal testen ob Verzeichnis existiert delphi... TATATA
^^

Vielen Dank für deine Hilfe... glaub ich bin solangsam zu Müde... (HEUTE ist 2.MAI :D)