File_CopyTree
Description
Section titled “Description”Copies a folder, including all files and subfolders
Syntax
Section titled “Syntax”File_CopyTree(sSourceDir, sTargetDir, bRemoveTarget) As Boolean
Parameters
Section titled “Parameters”sSourceDir (String)
Section titled “sSourceDir (String)”Source directory
sTargetDir (String)
Section titled “sTargetDir (String)”Target directory
bRemoveTarget (Boolean)
Section titled “bRemoveTarget (Boolean)”Remove target before copying
Remarks
Section titled “Remarks”- 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.
Example
Section titled “Example”If bStatus Then bStatus = File_CopyTree(gsPackageRoot & "\Kit\Config", gsProgramFiles & "\CapaInstaller\Config", True)