Autor Beitrag
lkz633
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 136

WinXP, Suse Linux 8.2 (unter VMWare)
D7 Prof, K3 Prof
BeitragVerfasst: Mi 03.09.03 16:57 
Hi,

habe den ganzen Tag versucht, dies hinzubekommen, ohne erfolg

ich habe Strings im folgenden Format:

'-r-------- 1 root root 9323 Aug 30 2002 INSTALL'

Jetzt versuche ich an die Rechte, Groese, Filename usw einzeln heranzukommen.

Habe es auch z.B mit einer Schleife versucht, die rueckwaerts ueberprueft, wann ein Lerzeichen kommt, wenn der Dateiname aber ein leerzeichen hatte, gings schief.

Herzlichen Dank fuer eure Hilfe
lkz633
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Mi 03.09.03 17:13 
Hallo,

warum fängst du dann nciht vorne an?
Da hast du immer eine feste Anzahl von Freizeichen und alles was nach dem 8ten kommt ist Dateiname.

Gruß
Klabautermann
lkz633 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 136

WinXP, Suse Linux 8.2 (unter VMWare)
D7 Prof, K3 Prof
BeitragVerfasst: Mi 03.09.03 18:20 
Jetzt sehe ich sogar, dass die Anzahl der leerzeichnen nicht immer gleich ist. So ein sche*** :evil:
blackbirdXXX

ontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 1077
Erhaltene Danke: 1

Ubuntu Dapper

BeitragVerfasst: Do 04.09.03 09:41 
Kannst du ein paar solche Strings posten damit man sieht wie sie aufgebaut sind?

_________________
Klein, schwarz und ärgert Techniker? Jumper!
barfuesser
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 324



BeitragVerfasst: Do 04.09.03 09:43 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
LogLine := '-r-------- 1 root root 9323 Aug 30 2002 INSTALL';
Contents := TStringList.Create;
Contents.Delimiter := ' ';
Contents.DelimitedText := LogLine;
while Contents.IndexOf('') >= 0 do Contents.Delete(Contents.IndexOf(''));
Rights := Contents[0];
User := Contents[2];
Group := Contents[3];
Size := StrToInt(Contents[4]);
...

barfuesser
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Do 04.09.03 10:18 
Du kannst auch die Funktion Explode benutzen.

Gruß
Tino
lkz633 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 136

WinXP, Suse Linux 8.2 (unter VMWare)
D7 Prof, K3 Prof
BeitragVerfasst: Do 04.09.03 12:52 
Hallo,

habe das Problem geloest, herzlichen Dank fuer eure Hilfe

Gruss lkz633