Autor Beitrag
bruder jonas
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 76



BeitragVerfasst: So 21.07.02 18:01 
hi,

ich möchte die dateigröße der per filebox ausgewählten datei ermitteln und in einer progressbar verarbeiten.

wie ermittle ich die größe?

danke
Alfons-G
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 307

Win XP Prof, Linux, Win 7
D5 Prof, D7 Architect, D2005 Architect, D2007 Architect
BeitragVerfasst: So 21.07.02 18:10 
Entweder Du verwendest eine WinAPI-Funktion oder Du öffnest die Datei als file of byte, wendest die Funktion FileSize(file) darauf an und schliesst die Datei wieder.

:idea:

_________________
Alfons Grünewald
bruder jonas Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 76



BeitragVerfasst: So 21.07.02 18:18 
Titel: danke, bekomme aber fehlermeldung
hier mein quelltext
ausblenden Quelltext
1:
2:
3:
AssignFile(f,box_file.FileName);
     size:=filesize(f);
     label1.caption := inttostr(size);

kommt ein e/a-fehler,

woran kann das liegen?

danke
Visum
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 106



BeitragVerfasst: So 21.07.02 22:04 
Hi,
füg noch ein reset(f); ein.

ausblenden Quelltext
1:
2:
3:
4:
5:
AssignFile(f,box_file.FileName); 
     reset(f);
     size:=filesize(f); 
     label1.caption := inttostr(size); 
closefile(f);


Ich weiss zwar nicht so genau, was box_file meint, aber solange es den Pfad einer existierenden Datei ausgibt müsste es so gehen.

Gruß
Visum