Copies a file.
Category: | External File |
Returned data type: | Integer |
Note: | The returned value is a Boolean value where 1= success and 0 = error. |
copyfile(<source_file, target_file>)
source_file
a string representing the name of the file to be copied; this can be specified as a fixed string, field name, or expression
target_file
a string representing the name of the file to be written; this can be specified as a fixed string, field name, or expression
The copyfile function copies a file. If the target file exists, the copyfile function will overwrite the target file.
string source_file
string target_file
boolean rc_ok
source_file="C:\mydata.txt"
target_file="C:\mydata_copy.txt"
rc_ok = copyfile(source_file, target_file)