Copies a file.
FileCopy source, destination
The FileCopy statement syntax has these named arguments:
Part |
Description |
source |
String expression that specifies the name of the file to be copied. The source may include directory or folder, and drive. |
destination |
String expression that specifies the target filename. The destination may include directory or folder, and drive. |
If you try to use the FileCopy statement on a currently open file, an error occurs.
Kill Statement, Name Statement.
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 filename.= "DESTFILE" ' Define target filename.SourceFile, DestinationFile ' Copy source to target.