var sPath : string; begin if OpenDialog.Execute = True then begin if SelectDirectory('Nouveau chemin','',sPath ) then begin if CopyFile(PChar(OpenDialog.FileName),PChar(sPath + ExtractFileName(OpenDialog.FileName)),False) = True then DeleteFile(OpenDialog.FileName); end; end; end;
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionvar sPath : string; begin if OpenDialog.Execute = True then begin if SelectDirectory('Nouveau chemin','',sPath ) then begin if CopyFile(PChar(OpenDialog.FileName),PChar(sPath + '\' + ExtractFileName(OpenDialog.FileName)),False) = True then DeleteFile(OpenDialog.FileName); end; end; end;