![]() |
extract subdirectory name
let's suppose this :
Delphi-Quellcode:
[b]Label1.caption :='c:\Folfer1\file1'[/b]
i want to dispaly : label2.caption:=File1 label3.caption:=' nothing to display ' [b]Label1.caption :='c:\Folder1\Folder2\file1'[/b] i want to dispaly : label2.caption:=File1 label3.caption:='repertoire2\' |
Re: extract subdirectory name
Hi,
what about using some kind of Tokenizer (e.g. ![]() Regards Der Unwissende |
Re: extract subdirectory name
Thank you Der_Unwissende
Could you please give me an Exemple . |
Re: extract subdirectory name
Hi mijack,
try a combination of ![]() ![]()
Delphi-Quellcode:
Regards
var
s, t : string; begin s := 'c:\Folder1\file1'; t := ExtractRelativePath('c:\Folder1\', ExtractFilePath(s)); // -> t = '' s := 'c:\Folder1\Folder2\file1'; t := ExtractRelativePath('c:\Folder1\', ExtractFilePath(s)); // -> t = 'Folder2\' end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:26 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz