CopyFile
CopyFile
Copies a file to a new location.
Syntax
FileSystem.CopyFile(SourceFile, DestinationFile)
FileSystem.CopyFile(SourceFile, DestinationFile, Overwrite)
Parameters
SourceFile |
String, input |
|
The file to be copied. |
||
DestinationFile |
String, input |
|
The location to which the file should be copied. |
||
Overwrite |
Boolean, input |
|
True to overwrite existing files, otherwise False. Default is False. |
Example
Sub Main()
FileSystem.CopyFile "C:\Users\Public\My Directory\Test.txt", "C:\Users\Public\Test Directory\Test.txt", False
End Sub