Share via


DirectoryInfo.MoveTo Method

Moves a DirectoryInfo instance and its contents to a new path.

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)

Syntax

public void MoveTo (
         string destDirName
)

Parameters

  • destDirName
    The name and path to which to move this directory. The destination cannot be another disk volume or a directory with the identical name. It can be an existing directory to which you want to add this directory as a subdirectory.

Version Information

Available in the .NET Micro Framework versions 3.0, 4.0, 4.1, and 4.2.

See Also

Reference

DirectoryInfo Class
DirectoryInfo Members
System.IO Namespace