CopyTo(Destination: String);
Destination — path that corresponds to a directory, into which one must be copied.
The CopyTo method copies a directory with all its contents.
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 the example, the New_folder directory with all its contents is copied to Temp.
See also: