title: How to Search a File through all the SubDirectories in Delphi
body: <p>I have implemented this code in Delphi, it will search for the File or the name given but it omits searching all the subdirectories. How can this be done?</p>
  
  <p>Code:</p>
  
  <pre><code> if FindFirst(filePath,faAnyFile,searchResult)=0 then
    try
      repeat
      lbSearchResult.Items.Append(searchResult.Name);
  
      until FindNext(searchResult)&lt;&gt;0
    except
    on e:Exception do
    ShowMessage(e.Message);
    end; //try ends
    FindClose(searchResult); 
  </code></pre>