MoveTo(Destination: String);
Destination - path that corresponds to the directory, into which one must be moved.
The MoveTo method moves a directory with all its contents.
Sub UserProc;
Var
Dir: IDirectoryInfo;
Begin
Dir:=New DirectoryInfo.Attach("c:\New_folder");
If Dir.Exists Then
Dir.MoveTo("c:\Temp");
End If;
Dispose Dir;
End Sub UserProc;
After executing the example, the New_folder directory with all its contents is moved to Temp.
See also: