hi,
This makes more sense.
Use the commands RenameFile and MoveFile for renaming and moving files.
var
oldName, NewName: string;
begin
...
OldName := 'MyFile.db';
NewName := 'YourFile.db';
RenameFile(oldName, NewName)
MoveFile(Pchar(Oldname, Pchar('C:\History\' + copy
(OldName, 1, length(OldName) - 4) + '.BAK'));
end;
Renamefile just renames the file. With MoveFile you can move and rename a file.
OldName and NewName are of string type and can therefor contain complete mapping.
Steph [Bigglasses]