File_CopyFile
Description
Section titled “Description”Copies a file from source to a destination
Syntax
Section titled “Syntax”File_CopyFile(sSourceFile, sTargetFile, bOverWrite) As Boolean
Parameters
Section titled “Parameters”sSourceFile (String)
Section titled “sSourceFile (String)”File to copy
sTargetFile (String)
Section titled “sTargetFile (String)”Name of targetfile
bOverWrite (Boolean)
Section titled “bOverWrite (Boolean)”Overwrite existing file
Remarks
Section titled “Remarks”- The source file must exist. If it doesn’t, the function returns False.
- If the target file exists and bOverWrite is False, the file isn’t copied and the function returns True.
- If bOverWrite is True, a read-only target file is also overwritten. The function removes the read-only attribute first.
Example
Section titled “Example”If bStatus Then bStatus = File_CopyFile(gsPackageRoot & "\capalib.chm", gsProgramFiles & "\CapaInstaller\capalib.chm", True)