Skip to content

File_CopyFile

Copies a file from source to a destination

File_CopyFile(sSourceFile, sTargetFile, bOverWrite) As Boolean

File to copy

Name of targetfile

Overwrite existing file

  • 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.
If bStatus Then bStatus = File_CopyFile(gsPackageRoot & "\capalib.chm", gsProgramFiles & "\CapaInstaller\capalib.chm", True)

Scripting Guidelines

File functions Constants Package Property Variables