CopyFile

Extracted nested table 5

0

Simple copying of a file.

1

Copying fails if the file already exists.

2

First creates a template for the file, before it is used. This procedure is recommended in a situation with poor connections, in order to prevent copying of incomplete files.

4

Creates a backup of the old file.

Extracted nested table 3

0

Simple copying of a file.

1

Copying fails if the file already exists.

2

First creates a template for the file, before it is used. This procedure is recommended in a situation with poor connections, in order to prevent copying of incomplete files.

4

Creates a backup of the old file.

This script function can be used for executing two different copy processes.

1. Copy from the host PC to the target device:

Copyfile(<$NetShare$>\<%Targetfolder%>\<%Filename%>,<%Targetfolder%>,<%CopyFlag%>);

Parameter

Description

<$NetShare$>

Name of the activation in which the folder structure can be found.
Example value:

"\\hostPc\TcManagementSrv_TEST"

<%Targetfolder%>

Specifies the name of the directories to which the file is to be copied on the device.

Example value:

"\Hard Disk\TestFolder"

<%Filename%>

Specifies the name for the file to be copied on the device.

Example value:

"TestFile1.txt"

<%Targetfolder%>

Specifies the path of the folder structure to be copied. (Usually the same name as the first "Targetfolder" parameter. Therefore the same parameter name)
Example value:

"\Hard Disk\TestFolder"

<%CopyFlag%>

Options for the copy function.
Example values:

see "Extracted nested table 3"

Example:

Copyfile("\\hostPC\TcManagementSrv_TEST\Hard Disk\TestFile1.txt","\Hard Disk",1);

2. Copying locally on the target device:

Change the parameter names as described here:

Copyfile(<%LocalShare%>\<%Sourcefolder%>\<%Filename%>,<%Targetfolder%>,<%CopyFlag%>);

Parameter

Description

<%LocalShare%>

Local path under which the folder structure can be found.
Example value:

"\Hard Disk"

<%Sourcefolder%>

Specifies the path of the folder structure to be copied.

Example value:

 

"\TestFolder"

<%Filename%>

Specifies the name for the file to be copied on the device.

Example value:

"TestFile1.txt"

<%Targetfolder%>

Specifies the name of the directories to which the file is to be copied on the device.

Example value:

"\Hard Disk\System\TestFolder"

<%CopyFlag%>

Options for the copy function.
Example values:

see "Extracted nested table 5"



Example:

The following example copies the file "TestFile1.txt" from folder "\Hard Disk\system" to folder "\Hard Disk\TestFolder":

Copyfile("\Hard Disk\System\TestFile1.txt","\Hard Disk\TestFolder",1);