CopyFile
file,-folder-and-read-functions CopyFile
syntax
- CopyFile(source_filename, target_filename)
definition
CopyFile(source_filename, target_filename) copies the source_filename to the target_filename.
If the target_filename already exists, it will be overwritten (the initfile function does not overwrite an existing target_filename)
description
In the GeoDMS use forward slashes(/) in path names in stead of backward slashes.
applies to
data items or literal source_filename and target_filename with string value-type
conditions
The source_filename must exist, if not an error is generated.
The folder of the target_filename to which the file is copied will be created, if it did not already exists.
example
parameter<string> CopyFile := CopyFile('c:/tmp/test.txt', 'd:/tmp/test.txt');
result: updating this item copies the source file c:/tmp/test.txt to the target file d:/tmp/test.txt, even if the targetfile does not exists.