Click or drag to resize

FileCopy(String, String) Method

Copies an existing file to a new file.

Namespace: Crestron.SimplSharp.CrestronIO
Assembly: SimplSharpHelperInterface (in SimplSharpHelperInterface.dll) Version: 2.21.121
Syntax
C#
public static void Copy(
	string sourceFileName,
	string destFileName
)

Parameters

sourceFileName  String
Source file to copy.
destFileName  String
The name of the destination file.
Exceptions
ExceptionCondition
InvalidDirectoryLocationExceptionInvalid Directory location specified for source or destination.
IOExceptiondestFileName exists or a file system error has occurred.
DirectoryNotFoundExceptionSpecified directory for source or destination does not exist.
PathTooLongExceptionSpecified path for source or destination is greater than 248 characters.
FileNotFoundExceptionThe source file does not exist.
UnauthorizedAccessExceptionSource or destination access is not provided to the user.
ArgumentExceptionsourceFileName or destFileName contain invalid characters.
ArgumentNullExceptionsourceFileName or destFileName is null.
NotSupportedExceptionsourceFileName or destFileName is of invalid format.

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also