You are here: Home » Builder » Finding files…

Finding files…

7 May |


[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]

You like this post? Be the first of my friends to give me a beer! click here. Thanks!
Filed under

Builder

| Tags:

2 Comments.

  1. Adrian Nasulea

    multumesc