System::IO::File::Copy method

File::Copy method

Copies the specified file to the specified location. If the destination file already exists, a parameter specifies if it should be overwritten.

static void System::IO::File::Copy(const String &sourceFileName, const String &destFileName, bool overwrite=false)
ParameterTypeDescription
sourceFileNameconst String&A path of the file to copy
destFileNameconst String&A path of the new location of the file to copy
overwriteboolTrue if the existing destination file should be overwritten, false if copying should fail if the destination file already exists

See Also