alucard Posted August 24, 2015 Posted August 24, 2015 Küçük bir programım var. uzaktaki bir klasörde dosya arıyor ve listboxta listeliyor. program bilgisayarda sorunsuz çalışıyor. kodlarım şunlar: function DosyaListele(KlasorAdi:String;const Liste:TStrings;const Kriter:String='*.*'):Integer; procedure DosyaTara(const Yol:String); var Ara:TSearchRec; st: TSystemTime; lt: TFileTime; dt: TDateTime; begin if FindFirst(Yol+Kriter,faAnyFile,Ara)=0 then repeat if Ara.Attr and faDirectory = 0 then dosyayolu :=StringReplace(Yol+Ara.Name, '\\212.156.84.70\ekg\', '', [rfReplaceAll]); Liste.Add(dosyayolu); until FindNext(Ara)<>0; FindClose(Ara); if FindFirst(Yol+'*.*',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; DosyaListele(edit4.Text,ListBox1.Items,edit1.text+'*'+edit2.text+'*'+edit3.text+'*.*'); procedure TEkgDosyaAramaMainF.ListBox1DblClick(Sender: TObject); var dosya : string; begin dosya := edit4.Text+'\'+ ListBox1.Items[ListBox1.ItemIndex]; ShellExecute(Application.Handle, 'open', PChar(dosya), nil, nil, SW_NORMAL); end; bunun aynısını uniforma yazdığımda çalışmıyor. Quote
alucard Posted August 24, 2015 Author Posted August 24, 2015 dosya yolunu yanlış yazmışım çalışıyor. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.