Skip to main content
Version: 4.49.0-beta

IO Operation

This component allows you to move, copy, delete, and rename files on the filesystem. It also allows you to check if a file exists on the file system. To access the local filesystem, the XILL4_WORKDIRS environment variable must be set to the path of the directories to be accessed.

Configuration

Operation The operation to execute on the file. The following operations are available:

  • copy: Copy a file or folder from one location to another. source and target must be set for this operation.
  • move: Move a file or folder from one location to another. This operation can also be used to rename a file. source and target must be set for this operation.
  • delete: Delete a file or folder. source must be set for this operation.
  • exists: Check if a file or folder exists.source must be set for this operation.
  • create: Create a directory. source must be set for this operation.

Source File The path to the source file. This path can either be relative or absolute. A relative path will be relative to the execution directory of the application.

Target File The path to the target file. This path can either be relative or absolute. A relative path will be relative to the execution directory of the application. The application will throw an error if the target file already exists. However, if the Overwrite existing files option is set, it will proceed and the target file will be overwritten.

Overwrite existing files When ticked, the copy and move operations will overwrite existing files.

Inputs

  • Name: Input

    • Description: When the source and target fields are given in the incoming message they take precedence over the configured values.

    • Example:

      {
      "source": "C:\\Users\\Administrator\\Downloads\\new.xlsx",
      "target": "C:\\Users\\Administrator\\Downloads\\new2.xlsx"
      }

Outputs

  • Name: Output

    • Description: When a file operation succeeds, the component will output

    • Example:

      {
      value: {
      // The incoming message
      },
      result: {
      "ok": true
      }
      }
    • Example: On the exists operation, the component will output

      {
      value:{
      // The incoming message
      },
      result: {
      "ok": true,
      "exists": true | false
      }
      }

      The component will throw an error if the operation fails.