ph_copyfile PowerHome formula function
Description
Makes a copy of the specified file.
Syntax
ph_copyfile ( sourcefilespec, targetfilespec, writemode )
Argument |
Description |
sourcefilespec |
String representing the full path and filename of the source file. |
targetfilespec |
String representing the full path and filename of the target file. |
writemode |
Integer representing whether to overwrite the file if it already exists. Use 0 to keep an existing file, any other value to overwrite. |
Return value
Integer. Returns a 0 if the source file was successfully copied. Returns -1 if an error occurred opening the source file. Returns -2 if an error occurred opening the target file.
Examples
The following examples demonstrate typical syntax/usage for this function.
• ph_copyfile("C:/powerhome/powerhome.db","C:/Documents/BakUps/powerhome.db",1)