File transfer commands: upload/download

File Transfer feature has four available commands:
  • Upload to Server
  • Download to HMI Device
  • Verify File Transfer Connection
  • Accept File Transfer SSH Key
The last two commands are used on the preconfigured File transfer connection settings screen. You do not need to configure these commands if you are using the preconfigured settings screen.
Upload to Server
IMPORTANT:
To upload the files or folders to the server, you must have read/write permissions configured on your FTP server, otherwise transfer status code 160 is returned.
In View Designer, use Upload to Server command and complete the following parameters:
  • ConnectionID
    : The identifier of the connection. Choose the value from 0 to 4 corresponding to the file transfer connection you configure on the HMI device at runtime.
  • FileOrFolder
    : Name of the file or folder you want to upload to the FTP server. You can provide multiple names separated by commas without spaces.
    TIP: View Designer supports wildcarts – the ability to use special characters to identify multiple files.
    Supported Characters:
    -
    : single character
    *
    : any number of characters (including zero)
    [abc]
    : any of the characters listed
    [a-c]
    : any of the characters in the listed range
    [!abc]
    : any character that is not listed
    [!a-z]
    : any character outside the specified range
    **
    used only as a path, meaning recursive nesting is possible (the remaining characters can be used as a folder or file name) Read more about wildcards: https://help.sumologic.com/docs/send-data/reference-information/use-wildcards-paths/
  • ServerSubfolder
    : If you specify the subfolder, your file will be uploaded to the destination you have specified. If the file path does not exist, it will be created by the application. If this value is not specified, your file will be uploaded to the default folder on the server or subfolder entered within the connection configuration for the "Folder location" on the predefined File transfer connection screen.
  • KeepLocalFile
    : This field allows you to choose if you want to remove your local file after uploading it to server. Choose yes or no.
  • ConflictResolution
    : If your file has the same name as the file that already exists on the server, you can choose if you want to overwrite the existing file, rename it (if you choose this option, the renamed file will have the suffix _001, _002, etc.), or skip the file that has the same name.
  • Source
    : Choose if the file or folder is uploaded from a USB drive or the SD card on the HMI device.
  • TransferStatus
    The status of the file transfer command execution. It enables you to track the progress of file or folder upload by presenting the code status File transfer command statuses.
Download to HMI Device
In View Designer, use Download to HMI Device command and complete the following parameters to download the file or folder to your HMI device:
  • ConnectionID
    : The identifier of the connection. Choose the value from 0 to 4 corresponding to the file transfer connection you configure on the HMI device at runtime.
  • FileOrFolder
    : Name of the file or folder you want to download to the HMI device. You can provide multiple names separated by commas without spaces.
    TIP: View Designer supports wildcarts – the ability to use special characters to identify multiple files.
    Supported Characters:
    -
    : single character
    *
    : any number of characters (including zero)
    [abc]
    : any of the characters listed
    [a-c]
    : any of the characters in the listed range
    [!abc]
    : any character that is not listed
    [!a-z]
    : any character outside the specified range
    **
    used only as a path, meaning recursive nesting is possible (the remaining characters can be used as a folder or file name) Read more about wildcards: https://help.sumologic.com/docs/send-data/reference-information/use-wildcards-paths/
  • LocalSubfolder
    : If you specify the subfolder, your file will be downloaded to the destination you have specified. If the file path does not exist, it will be created by the application. If this value is not specified, your file will download to the root folder of the USB drive or SD card on your HMI device.
  • ConflictResolution
    : If your file has the same name as the file that already exists on the HMI device, you can choose if you want to overwrite the existing file, rename it (if you choose this option, the renamed file will have the suffix _001, _002, etc.), or skip the file that has the same name.
  • Destination
    : Choose if the file is downloaded to a USB drive or the SD card on the HMI device.
  • TransferStatus
    (optional, integer): The status of the file transfer command execution. It enables you to track the progress of file download by presenting the code status File transfer command statuses.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal