Moo_FileCopy  -  Copy a file.

Moo_FileCopy ( sSource; sDestination; bOverwrite; bProgress );

This functions lets you make a copy of a local file.

Parameters

NameTypeRequiredDefaultDescription
sSourceStringYes The input file to be copied.
sDestinationStringYes Where should the file be copied to.
bOverwriteBooleanNoFalseShould existing files be overwritten.
bProgressBooleanNoFalseShow file copy progress.

Return Value

Returns either a boolean value of true if the file copy succeeded, or an error code.

Can optionally be used with the Moo_ProgressOptions function.

Errors

Error CodeDescription
Moo_FileCopy|Err_1Invalid number of arguments.
Moo_FileCopy|Err_2Invalid source file input.
Moo_FileCopy|Err_3Source file does not exist.
Moo_FileCopy|Err_4Invalid destination file input.
Moo_FileCopy|Err_5Destination file already exists.
Moo_FileCopy|Err_6Error copying file.

Related Functions