Shell.Copy (gb.util)
Static Sub Copy ( Source As String, Destination As String [ , Force As Boolean ] )
Since 3.20
Copy a file or a directory recursively.
-
Source : The source file or directory.
-
Destination : The target of the copy.
-
Force : If
True
, existing targets are replaced. Otherwise an error is raised.
Here is the possible behaviours:
If the source is
|
If the destination is
|
Behaviour
|
An existing directory
|
An existing directory
|
Copy the source directory inside the destination directory.
|
An existing directory
|
A non-existing path
|
Copy the source directory to the destination directory.
|
A file
|
An existing directory
|
Copy the source file into the destination directory.
|
A file
|
A non-existing path.
|
Copy the source file to the destination path.
|
Other possibilities raise an error.