title: Determining which file in a folder is the latest by "modified date"?
body: <p>I need to scan a specific folder for the latest file (basically check the modified date to see which is the newest), But keep in mind that the files have random names. Here's what I got so far:</p>
  
  <pre><code>procedure TForm1.Button1Click(Sender: TObject);
  begin
  
  ftp.Host := 'domain';
  ftp.Username := 'username';
  ftp.password := 'password';
  ftp.Connect;
  ftp.Put('random-filename.ext'); //This is where it should grab only the latest file  
  ftp.Quit;
  ftp.Disconnect;
  
  end;
  </code></pre>
  
  <p>Is this possible?</p>
  
  <p>Thank you!</p>