{
Rename example
}
uses Dialogs;
var
  f : file;
begin
  OpenDialog1.Title := 'Choose a file... ';
  if OpenDialog1.Execute then 
  begin
    SaveDialog1.Title := 'Rename to...';
    if SaveDialog1.Execute then 
    begin 
      AssignFile(f, OpenDialog1.FileName);
      Canvas.TextOut(5, 10, 'Renaming ' + OpenDialog1.FileName + 
                     ' to ' + SaveDialog1.FileName);
      Rename(f, SaveDialog1.FileName);
    end;
  end;
end; 
