Autor Beitrag
Marcasso
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17



BeitragVerfasst: Mo 15.01.07 20:01 
hallo,
ich lade deitein mit ihrem pfad in listA und nun möcte ich dass nur der dateiname in listB angezeigt wird, nur wie bekomme ich das hin? lg
MisterBum83
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 245
Erhaltene Danke: 2

WIN XP
Delphi 6
BeitragVerfasst: Mo 15.01.07 20:03 
ExtractFileName
Marcasso Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17



BeitragVerfasst: Mo 15.01.07 20:35 
wie muss ich es dann schrieben?

listB.Items.Add(ExtractFileName(listA.Items.Strings[]));
aber was muss ich in die eckicge klammer schrieben?
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19314
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mo 15.01.07 20:41 
Da wirst du wohl mit einer Schleife durchgehen müssen, wenn du alle Einträge willst... ;-)
for i := 0 to listA.Items.Count - 1 do, und schon hast du i für den i-ten Eintrag. Und genau solch ein Index, mit dem du angibst, den wievielten Eintrag du meinst, muss ja in die eckigen Klammern.