Platform Core .NET Assemblies API
Move Method
See Also  Send Feedback
Terrasoft.IO Namespace > IDirectory Interface : Move Method
sourceDirName
The path of the file or directory to move.
destDirName
The path to the new location for sourceDirName. If sourceDirName is a file, then destDirName must also be a file name.

Glossary Item Box

Moves a file or a directory and its contents to a new location.

Syntax

 
C#
 
 

Parameters

sourceDirName
The path of the file or directory to move.
destDirName
The path to the new location for sourceDirName. If sourceDirName is a file, then destDirName must also be a file name.

Exceptions

ExceptionDescription
System.IO.IOException

An attempt was made to move a directory to a different volume.

-or-

destDirName already exists.

-or-

The sourceDirName and destDirName parameters refer to the same file or directory.

-or-

The directory or a file within it is being used by another process.

System.UnauthorizedAccessExceptionThe caller does not have the required permission.
System.ArgumentExceptionsourceDirName or destDirName is a zero-length string, contains only white space, or contains one or more invalid characters.
System.ArgumentNullExceptionsourceDirName or destDirName is null.
System.IO.DirectoryNotFoundExceptionThe specified path is not found or invalid (for example, it is on an unmapped drive).

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© Terrasoft 2002-2018.