title: How do I make FindFirst look for files in the current directory?
body: <p>I'm having trouble writing code for a procedure that will open a directory folder and delete all of the files within it recursively so that I can in turn delete the folder itself. I won't have trouble with the recursive procedure, but I can't seem to get the FindFirst/FindNext/FindClose functions to work properly. The procedure below should search the current directory for any files of any type (however I may be misusing string wildcards; I didn't find much online about the syntax of their use).</p>
  
  <pre><code>procedure TForm1.Button1Click(Sender: TObject);
  var SR: TSearchRec;
  begin
   ShowMessage(GetCurrentDir);
   if (FindFirst('\*.*',faAnyFile,SR)=0) then
   begin
    repeat
     ShowMessage(SR.Name);
    until FindNext(SR)&lt;&gt;0;
    FindClose(SR);
   end
   else begin
    ShowMessage('No matching files found');
   end;
  end;
  </code></pre>
  
  <p>Right now it seems that no matter what I put in for the filename, the procedure never finds any files and always returns the 'No matching files found' message.</p>