Topic: How to copy files to destination and copy files if only idate is older
Do you have an example to do following:
How to copy files to other destination and replace files if only the date is older
Regards,
Pierre
My Visual Database → General → How to copy files to destination and copy files if only idate is older
Do you have an example to do following:
How to copy files to other destination and replace files if only the date is older
Regards,
Pierre
function CopyEx(ExistsFileName, NewFileName: string): boolean;
begin
result := False;
if GetFileLastWriteTime(ExistsFileName) > GetFileLastWriteTime(NewFileName) then
result := CopyFile(ExistsFileName, NewFileName);
end;
// how to use
procedure Form1_Button6_OnClick (Sender: TObject; var Cancel: boolean);
begin
if CopyEx('d:\1.bmp', 'd:\wmpnss_color32.bmp') then ShowMessage('Replaced') else ShowMessage('Fail');
end;
спасибо, Thank you, Merci
Pierre P.
My Visual Database → General → How to copy files to destination and copy files if only idate is older
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi