Ver Mensaje Individual
  #7  
Antiguo 02-02-2011
Avatar de duilioisola
[duilioisola] duilioisola is offline
Miembro Premium
 
Registrado: ago 2007
Ubicación: Barcelona, España
Posts: 1.738
Reputación: 20
duilioisola Es un diamante en brutoduilioisola Es un diamante en brutoduilioisola Es un diamante en bruto
Me sigue quedando la duda: ¿No te da ningún mensaje de error?
¿O sea, pasa por la linea CopyFile(...); y no dice nada?
¿No te da una exception que diga algo? (el archivo ya existe, no tiene permiso, no existe la unidad, etc.)

Prueba poniendo a True la útima propiedad de CopyFile
Código Delphi [-]
CopyFile(PChar(vFile), PChar('X:\RIS.XML'), True);

Código sacado de Torry's Delphi Pages
Código Delphi [-]
{
  The CopyFile function copies an existing file to a new file.


 CopyFile(
  lpExistingFileName : PChar, // name of an existing file
  lpNewFileName : PChar,      // name of new file
  bFailIfExists : Boolean);   // operation if file exists

bFailIfExists:
  Specifies how this operation is to proceed if a file of the same name as
  that specified by lpNewFileName already exists.
  If this parameter is TRUE and the new file already exists, the function fails.
  If this parameter is FALSE and the new file already exists,
  the function overwrites the existing file and succeeds.
}

var
  fileSource, fileDest: string;
begin
  fileSource := 'C:\SourceFile.txt';
  fileDest := 'G:\DestFile.txt';
  CopyFile(PChar(fileSource), PChar(fileDest), False);
end;
Responder Con Cita