Skip to content

File_CopyTree

Copies a folder, including all files and subfolders

File_CopyTree(sSourceDir, sTargetDir, bRemoveTarget) As Boolean

Source directory

Target directory

Remove target before copying

  • The source directory must exist. If it doesn’t, the function returns False.
  • Files that already exist in the target directory are always overwritten.
  • If bRemoveTarget is True and the target directory exists, the function deletes it, including read-only files, before it copies. If bRemoveTarget is False, files in the target that don’t exist in the source are kept.
If bStatus Then bStatus = File_CopyTree(gsPackageRoot & "\Kit\Config", gsProgramFiles & "\CapaInstaller\Config", True)

Scripting Guidelines

File functions Constants Package Property Variables