File System Connector 25.1
File System Connector Help

# Insert Files into the File System

The connector's `insert` fetch action can insert files into the file system. To use the `insert` action, you must construct some XML that specifies where to add each file, and the information to insert.

To insert a file, set the `reference` to the path where you want to insert the file. Use the `file` element to specify the content to insert. There are several ways that you can do this, for example specifying the path to a file or providing the content base-64 encoded. For more information about how to specify the source file, refer to the File System Connector Reference.

The following example would insert a file at the location `C:\files\file.txt`. The file would contain the content "This is my file".

    <insertXML>
      <insert>
        <reference>C:\files\file.txt</reference>
        <file>
          <type>content</type>
          <content>VGhpcyBpcyBteSBmaWxl</content>
        </file>
        <insert_id>012345</insert_id>
      </insert>
    </insertXML>

Add this XML to the insert fetch action as the value of the `insertXML` action parameter. The XML must be URL encoded before being used in the action command. For example:

    http://host:port/action=Fetch&FetchAction=Insert
                                 &ConfigSection=MyTask
                                 &InsertXML=[URL encoded XML]

For more information about using the `insert` fetch action, refer to the File System Connector Reference.

Copyright 2024 Open Text
Version 25.1 | Last updated January 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery File System Connector 25.1

Topic Title: Insert Files into the File System