Description
Copies a file.
Syntax
FileCopy source, destination
The FileCopy statement syntax has these named argument parts:
Part |
Description |
source |
String expression that specifies the name of the file to be copied — may include directory or folder, and drive. |
destination |
String expression that specifies the target file name — may include directory or folder, and drive. |
Remarks
Open files can only be copied for read-only access.
See Also
Kill Statement, Name Statement.
Example
This example uses the FileCopy statement to copy one file to another. For purposes of this example, assume that SRCFILE is a file containing some data.
SourceFile = "SRCFILE" ' Define source file name. DestinationFile = "DESTFILE" ' Define target file name. FileCopy SourceFile, DestinationFile ' Copy source to target.