Autor Beitrag
hibbert
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Mi 22.10.03 22:04 
Hi,
wie kann ich über den Opendialog den Datei namen auslesen? (Nicht den Pfad zur Datei !!)

thx hibbert

_________________
I kunnen väl svara endast ja eller nej
Om i viljen eller nej
obbschtkuche
Gast
Erhaltene Danke: 1



BeitragVerfasst: Mi 22.10.03 22:06 
entweder

Suche in: Delphi-Forum, Delphi-Library EXTRACTFILENAME

oder in der OH oder auf gut glück ;)
Setsuna Meio
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 70

Windows
Delphi
BeitragVerfasst: Mi 22.10.03 22:16 
Huhu,

mit OpenDialog.Filename in Verbindung mit ExtractFileName. =)

^^

_________________
Pluto, schicke das Feuer der Tiefe...
hibbert Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Do 23.10.03 22:14 
ok, das kann ja bei funzen, aber wie funzt das, wenn ich im opendialog die eigenschaft "Multiselect" aktiviert habe?

thx hibbert

_________________
I kunnen väl svara endast ja eller nej
Om i viljen eller nej
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 23.10.03 23:19 
Benutze Files - Bedienung s. TStringList, weil´s eine solche ist.
hibbert Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Do 23.10.03 23:31 
ok, ich habe es bis jetzt so versucht, komme damit aber zu keinem Ergebnis:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
var I:integer;
begin
if opendialog1.Execute=true then
for I:= 0 to OpenDialog1.Files.Count-1 do // -1 !
listbox1.Items.Add(opendialog1.Files.Names[i]);
end;

Was ist falsch?

Thx hibbert

_________________
I kunnen väl svara endast ja eller nej
Om i viljen eller nej
ErnestoChe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 528

Win 2000 pro, CRUX 2.0
Delphi 6 Pers, Open K3
BeitragVerfasst: Do 23.10.03 23:41 
Hi,

man gab dir doch den Tipp ExtractFileName zu benutzen um den Datei-Namen zu ermitteln. Ausserdem muss Names weg, siehe dazu OH.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
var
  i: Integer;
begin
  if OpenDialog1.Execute then
    for i := 0 to OpenDialog1.Files.Count - 1 do
      ListBox1.Items.Add(ExtractFileName(OpenDialog1.Files[i]));
end;


MFG

- Ernesto -
hibbert Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Fr 24.10.03 16:01 
Mit dem Tipp ExtractFileName konnte ich ehrlich gesagt nichts anfangen.

Mein Fehler war es, das ich das unbedingt mit opendialog1.files[i] machen wollte.

Und nun funzt es ja.

Vielen Dank !!

Hibbert

_________________
I kunnen väl svara endast ja eller nej
Om i viljen eller nej