1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Donation with Paypal!!!

    Go to your paypal account and send directly donation to [email protected]

    1 month - 10 $ - Standart VIP

    6 months - 20 $- Standart VIP

    1 year - 30 $- Standart VIP

    2 years - 50 $- Standart VIP

    Gold member for life - 150 $- Standart VIP

    High Vip (Standart VIP include) group please send PM or email to [email protected] for info

    After Donation please send email to [email protected]

  3. Donation Ways 2020


    Paysend
  4. Telegram
Dismiss Notice

Donation with Paypal!!!

Go to your paypal account and send directly donation to [email protected]

1 month - 10 $ - Standart VIP

6 months - 20 $- Standart VIP

1 year - 30 $- Standart VIP

2 years - 50 $- Standart VIP

Gold member for life - 150 $- Standart VIP

High Vip (Standart VIP include) group please send PM or email to [email protected] for info

After Donation please send email to [email protected]

Dismiss Notice
For open hidden message no need write thanks, thank etc. Enough is click to like button on right side of thread.

geting all Sub-paths from selected path

Discussion in 'Delphi Programming' started by GURGAH, Jan 5, 2014.

  1. GURGAH
    Offline

    GURGAH DF Member

    Gets all sub-paths into a TStringList. You must create string list before use in methot parameter.
    here is the code;
    Code:
    function DosyaListele(KlasorAdi:String;const Liste:TStrings;const Kriter:String='*.*'):Integer;
     procedure DosyaTara(const Yol:String);
     var Ara:TSearchRec;
     begin
       if FindFirst(Yol+Kriter,faAnyFile,Ara)=0 then
       repeat
         if Ara.Attr and faDirectory = 0 then
          Liste.Add(Yol+Ara.Name);
       until FindNext(Ara)<>0;
       FindClose(Ara);
       if FindFirst(Yol+Kriter,faDirectory,Ara)=0 then
       repeat //daha alt klasörleri tara
         if (Ara.Name<>'.') and (Ara.Name<>'..') and (Ara.Attr and faDirectory = faDirectory) then
          DosyaTara(Yol+Ara.Name+'\');
       until FindNext(Ara)<>0;
       FindClose(Ara);
     end;
    begin
      Liste.Clear;
      if (KlasorAdi<>'') and (KlasorAdi[Length(KlasorAdi)]<>'\') then KlasorAdi:=KlasorAdi+'\';
      DosyaTara(KlasorAdi);
      Result:=Liste.Count;
    end;
    
     

Share This Page