![]() |
Re: Pfade vegleichen...
Hallo,
hier ist noch eine Routine (ohne Gewähr):
Delphi-Quellcode:
// Edit: Continue statt Exit...
// uses StrUtils
procedure OptimizePathList (aSource, aTarget: TStrings); var i, j : Integer; Path : string; begin aTarget.Clear; for i := 0 to aSource.Count - 1 do begin Path := ExpandUNCFileName(aSource[i]); if (path = '') then // Exit; Continue; for j := aTarget.Count - 1 downto 0 do if AnsiStartsText(aTarget[j], Path) then begin Path := ''; Break; end else if AnsiStartsText(Path, aTarget[j]) then aTarget.Delete(j); if (Path <> '') then aTarget.Add(Path); end; end; Gruß Hawkeye |
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:03 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