Dann nimm halt den Dateinamen
Delphi-Quellcode:
if OpenDialog1.execute then begin
if not Copyfile(Pchar(Opendialog1.filename), Pchar(IncludeTrailingPathDelimiter(MyPath) + ExtractFileName(opendialog1.filename)), false) then
MessageBox(0,PChar(SysErrorMessage(GetLastError)),nil,MB_OK or MB_ICONERROR);
end;
Bernhard