FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Copiar ficheros.
Posts: 1445
Joined: Mon Oct 10, 2005 02:38 PM
Copiar ficheros.
Posted: Tue Jun 03, 2008 03:26 PM

Hola a todos,

para copiar ficheros engtre unidades utilizo COPY FILE .. TO .., y parece que todo va bien.

Pero como lo hago para que al copiar el fichero me conserve la fecha y hora original del fichero origen?

Saludos
Carlos G.

Un Saludo

Carlos G.



FiveWin 25.12 + Harbour 3.2.0dev (r2502110321), BCC 7.7 Windows 11 Home

Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Copiar ficheros.
Posted: Tue Jun 03, 2008 07:47 PM
    COPYFILE( "Z:\PIZZAS\CLIENTES.DBF", "C:\PIZZAS\CLIENTES.DBF", .F. )
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 1445
Joined: Mon Oct 10, 2005 02:38 PM
Copiar ficheros.
Posted: Wed Jun 04, 2008 08:17 AM
karinha wrote:
    COPYFILE( "Z:\PIZZAS\CLIENTES.DBF", "C:\PIZZAS\CLIENTES.DBF", .F. )


Gracias,

para que sirve el 3er. parámetro .F.?

Saludos
Carlos G.

Un Saludo

Carlos G.



FiveWin 25.12 + Harbour 3.2.0dev (r2502110321), BCC 7.7 Windows 11 Home

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Copiar ficheros.
Posted: Wed Jun 04, 2008 09:52 AM

Carlos,

El tercer parámetro es para que lo sobreescriba en caso de existir:

BOOL CopyFile(
LPCTSTR lpExistingFileName, // pointer to name of an existing file
LPCTSTR lpNewFileName, // pointer to filename to copy to
BOOL bFailIfExists // flag for 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.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1445
Joined: Mon Oct 10, 2005 02:38 PM
Copiar ficheros.
Posted: Wed Jun 04, 2008 01:06 PM
Antonio Linares wrote:Carlos,

El tercer parámetro es para que lo sobreescriba en caso de existir:

BOOL CopyFile(
LPCTSTR lpExistingFileName, // pointer to name of an existing file
LPCTSTR lpNewFileName, // pointer to filename to copy to
BOOL bFailIfExists // flag for 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.


Gracias a ambos,

Saludos
Carlos G.

Un Saludo

Carlos G.



FiveWin 25.12 + Harbour 3.2.0dev (r2502110321), BCC 7.7 Windows 11 Home

Continue the discussion