Use the [Remote File Management] operation to copy files between the display unit and the server.
The types of files you can copy are PNG, TXT, CSV, and BML.
copyFilesFromServer($Enums.Server.FTP, 1, SERVER_PATH,
1 2 3 4
$Enums.Storage.USBStorage, TARGET_PATH,
5 6
$Enums.FileConflictAction.Overwrite);
7
1: Copy Files
2: Server
3: Connect ID
4: Server Path
5: Target Storage
6: Target Path
7: If File Exists
[Copy Files] |
Select the operation between the copy source and destination. Select [fromServer] to copy the file from the server to the display unit. Select [toServer] to copy the file from the display unit to the server. Block
Text
|
[Server] |
Select the type of server to connect to. Block
Text
|
[Connect ID] |
The connection ID of the server to connect to, as an integer. The connection ID must be the ID set in the [FTP Connections] field in the [Project Explorer] window.
|
[Server Path] |
Specify the path of the file and folder on the server for the copy from or copy to operation. (Example) /Data1/image01.png
|
[Target Storage] |
Specify the display unit storage for the copy from or copy to operation. Block
Text
The [LocalStorage] storage option is available for ST6000 Series or STM6000 Series only.
|
[Target Path] |
Specify the path of the file and folder on the display unit for the copy from or copy to operation. When using SP5000 Series Open Box (Windows 10 IoT Enterprise Model), IPC Series, and PC/AT[Target Path] is the path in [Destination Folder (USB Storage)] or [Destination Folder (SD Card)]. For example, if [Target Path] is "/Folder1/" and [Destination Folder (USB Storage)] is "C:\USBStorage", the full path is "C:\USBStorage\Folder1". [Destination Folder (SD Card)] and [Destination Folder (USB Storage)] are found in [System Architecture] ➞ [Target01] ➞ [Function] tab ➞ [Options] subtab ➞ [Preferences].
|
[If File Exists] |
Specify whether to overwrite files with the same name that exist in the destination. Block
Text
The Text Mode input assistance feature displays both 'KeepBoth' and 'ConfirmationMessage' in 'FileConflictAction', but because they are not supported by the [Remote File Management] operation, selecting them displays an error.
|
(Example)
If you want to copy files from the folder "/Data1/" on the FTP server with an FTP connection ID of 1 to the folder "Folder1" in the display unit's USB storage, set the following script.
'copyFilesFromServer($Enums.Server.FTP, 1, "/Data1/", $Enums.Storage.USBStorage, "/Folder1/", $Enums.FileConflictAction.Overwrite);'