Previous Topic: CopyFile or Copy Link - Copy an Existing FileNext Topic: CreateDirectory or MkDir - Create a New Directory


CopyTree - Copy a Directory Tree

Valid on NetWare, Symbian OS, UNIX, Windows and Windows CE

The CopyTree function copies a directory tree. If the target path does not exist, this function creates it.

This file content function has the format:

CopyTree(
	source as String, 
	target as String, 
	overwrite as Boolean) as Boolean
CopyTree(source as String, target as String) as Boolean
source

Indicates the name of an existing directory.

target

Indicates the name of the new directory.

overwrite

Specifies if the function overwrites an existing target.

The default, TRUE, overwrites an existing target. FALSE causes the function to fail if the target file already exists.

Example: CopyTree function

This example copies the clientws directory tree to CliWS.

CopyTree("c:\clientws", "c:\cliws")

On successful completion, the function returns TRUE; otherwise, it returns FALSE.