IDirectoryInfo.CopyTo

Syntax

CopyTo(Destination: String);

Parameters

Destination — a path that corresponds to a directory into which one should be copied.

Description

The CopyTo method copies a directory with all its content.

Example

Sub Main;

Var

Dir: IDirectoryInfo;

Begin

Dir:=New DirectoryInfo.Attach("c:\New_folder");

If Dir.Exists Then

Dir.CopyTo("c:\Temp");

End If;

Dispose Dir;

End Sub Main;

After executing this example, a New_folder directory with all its content is copied to Temp.

See also:

IDirectoryInfo