Autor Beitrag
Joker_07
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55



BeitragVerfasst: Do 05.06.08 14:58 
Problem ich möchte einen text entfernen lassen bis zu einer bestimmten stelle, das Problem die länge des textes varriert ja( Dateipfad) , da delphi mir immer nur den ganzen pfad angibt und ich ja nur die dateiname haben möchte, möchte ich alles bis zum letzten slash-zeichen(/) alles entfernen lassen, wie mache ich das ... Bsp.

C:\Dokumente und Einstellungen\Benutzer1\Desktop\Delphi_Programme\Audioplayer\Music.mp3

Jetzt soll aber alles verschwinden und nur Music.mp3 soll noch da stehen wie mache ich das, danke schon mal im vorraus
mfg Joker_07
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Do 05.06.08 15:03 
Dafür gibts die Funktion ExtractFilename in der Unit SysUtils.

_________________
We are, we were and will not be.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 05.06.08 15:04 
Du suchst ExtractFilename.
Joker_07 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55



BeitragVerfasst: Do 05.06.08 15:12 
okay danke, aber ich hab nur keine ahnung wie das geht, wo stell ich das ein?

danke schon mal im vorraus
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Do 05.06.08 15:13 
ExtractFilename ist eine Funktion, die aus einem kompletten Pfad den Dateinamen raussucht. Was willst du da noch einstellen? :gruebel:

_________________
We are, we were and will not be.
Joker_07 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55



BeitragVerfasst: Do 05.06.08 15:18 
falsches wort benutzt, ich wusste nicht wie ich es schrieben muss, bin aber selbst draufgekommen durchs aus probieren, also danke :), es funktioniert jetzt