How file synchronization works

Script files synchronized with the MID Server are stored on the instance in the MID Server Script File [ecc_agent_script_file] table (MID Server > Script Files).

When the MID Server first connects to the instance, ServiceNow creates a directory called \scripts in the MID Server root. The instance then creates a parent directory in the path \scripts\<parent name> using definitions from the ecc_agent_script_file table. Finally, the instance creates the script files themselves inside the parent directory using the records from the ecc_agent_script_file table.

The record for the parent directory looks like this:

The instance creates each script file in the parent directory on the MID Server using the record Name from the ecc_agent_script_file table as the file name and the Script field payload as the file contents. A script file record looks like this: