Instrucción FileCopy

Copia un archivo.

Sintaxis:


FileCopy Source As String, Destination As String

Parámetros:

Source: Any string expression that specifies the name of the file that you want to copy. The expression can contain optional path and drive information. If you want, you can enter a path in URL notation.

Destination: Any string expression that specifies where you want to copy the source file to. The expression can contain the destination drive, the path, and file name, or the path in URL notation.

Icono de nota

La instrucción FileCopy solo se puede usar para copiar archivos que no estén abiertos.


Códigos de error:

5 Llamada a procedimiento no válida

76 Ruta no encontrada

Ejemplo:


Sub ExampleFileCopy
    FileCopy "c:\autoexec.bat", "c:\Temp\Autoexec.sav"
End Sub

¡Necesitamos su ayuda!