procedure TForm1.Button1Click(Sender: TObject);
var
f:TextFile;
begin
AssignFile(f,'d:\test.txt');
Rename(f,'d:\.txt');
end;