procedure TForm1.BtnSelectClick(Sender: TObject);
var DirTemp: string;
begin
DirTemp:=GetCurrentDir;
if SelectDirectory(DirTemp, [], 1000) then
begin
Panel1.Caption := DirTemp;
Edit1.Text := DirTemp;
end;
end;
procedure TForm1.BtnRenameClick(Sender: TObject);
begin
if DirectoryExists(Panel1.Caption) then
begin
RenameFile(Panel1.Caption, Edit1.Text);
Panel1.Caption := Edit1.Text;
end;
end;
|