Extensions Reference
Extensions Reference > fsFilesystem
fsCopy
bool fsCopy(string Source, string Dest, bool Overwrite);
Copies the specified file to the destination
The FSCOPY function copies the specified source file to the destination file, optionally overwriting the destination file if it already exists.
Parameters
Source
The path and filename of the source file. Remember to escape backslashes in any paths.
Dest
The path and filename of the destination file. Remember to escape backslashes in any paths.
Overwrite
True to overwrite the destination file if it exists, otherwise False to preserve the destination.
Return Value
True if the copy succeeded, otherwise False. If the destination file exists and the Overwrite parameter is set to False, this function returns False.
Example Code
// Copy sample.txt to copy.txt, overwriting copy.txt if it exists
fsCopy("C:\\sample.txt", "C:\\copy.txt", True);