Finding files…


[cpp]
void __fastcall TForm1::Button1Click(TObject *Sender)
{
 TSearchRec Sr;
 int Attributes = faAnyFile; 

 if (FindFirst(“C:\\tmp\\*.*”, Attributes, Sr) == 0)
{
   do
{
    if ((Sr.Attr & Attributes) == Sr.Attr)
     ListBox1->Items->Add(Sr.Name);
   
   } while (FindNext(Sr) == 0);

   FindClose(Sr);
 }
[/cpp]

  1. Adrian Nasulea

    multumesc

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>