# Insert a File

To insert a file, the `insertXml` must include the following properties.

`TYPE` | The type of item to insert. To insert a file, specify `FILE`.
`PATH` | The path of the file, including the filename, relative to the root of the list. The connector will create any folders that do not exist.

You must then specify either (`LISTID`, `SITEID`, and `SITECOLLECTIONURL`) or (`INSERTFROMPATH`, `SITEURL`, and `LISTNAME`).

`INSERTFROMPATH` | To insert a file by path, set this to `TRUE`.
`LISTID` | The GUID of the list to which you want to add the file.
`LISTNAME` | The name of the list to which you want to add the file.
`SITECOLLECTIONURL` | The absolute URL of the site collection to which you want to add the file.
`SITEID` | The GUID of the site to which you want to add the file.
`SITEURL` | The absolute URL of the site to which you want to add the file.

For example, the value of your `insertXML` action parameter might look like this:

    <insertXML>
      <insert>
        <reference>TEST_FILE</reference>
        <property name="TYPE" value="FILE"/>
        <property name="PATH" value="folder/subfolder/somefile.file"/>
        <property name="LISTID" value="26FFE115A45AF1F1"/>
        <property name="SITEID" value="E11526FFA45AF1F1"/>
        <property name="SITECOLLECTIONURL" value="http://sharepoint/SiteCollection/"/>
        <file>
          <type>file</type>
          <content>e:\my_files\myfile.doc</content>
        </file>
      </insert>
    </insertXML>

To insert a file by path, your XML might look like this:

    <insertXML>
      <insert>
        <reference>TEST_FILE</reference>
        <property name="TYPE" value="FILE"/>
        <property name="PATH" value="folder/subfolder/somefile.file"/>
        <property name="LISTNAME" value="MyList"/>
        <property name="SITEURL" value="http://sharepoint/SiteCollection/Site/"/>
        <property name="INSERTFROMPATH" value="TRUE"/>
        <file>
          <type>file</type>
          <content>e:\my_files\myfile.doc</content>
        </file>
      </insert>
    </insertXML>

© Copyright 2020 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a mail client, and then send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm