---
sourceDocument: Yokohama ServiceNow AI Platform Capabilities
sourceDocumentLink: https://www.servicenow.com/docs/r/yokohama/servicenow-platform

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama ServiceNow AI Platform Capabilities

ft:clusterId :

    - platcap

bundleId :

    - platcap

workflow :

    - Platform


---

# Files Compare activity

# Files Compare activity {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

The Files Compare activity compares two files on a Linux or UNIX computer.
This activity replaces an SSH activity by the same name available
in releases prior to Geneva. If you have a workflow created in a previous version that uses
the deprecated activity, your workflow will continue to work normally after upgrading to
Geneva. However, all new workflows must use the custom version of this activity. This
activity was built with the [SSH activity designer template](https://www.servicenow.com/docs/Voy9bPRPpW7WXHb_WtSf9w#t_CreateAnSSHActivity "Create an activity that extracts data from a target host that uses the SSH network protocol."), which gives workflow administrators the ability to
store input and output variables in the [databus](https://www.servicenow.com/docs/PrNTwrqX9mIH_QHC_03Elg#t_ReuseDataInTheActivityDesigner "The Data tab in the Workflow Editor lists all custom activities used in the current workflow that produce data and displays that data for reuse in other custom activities.").

To access this activity in the Workflow Editor, select the
Custom tab, and then navigate to Custom ActivitiesGlobalOrchestration - SSH.{#r_FilesCompareActivity__p_AccessSSHCustomActivities}

## Input variables

{#r_FilesCompareActivity__table_jkp_pwz_zp__entry__2}

| Input variable | Description |
|-|-|
| Hostname | Hostname or IP address of the destination server for SSH activity. |
| Directory | Name of the working directory. |
| OldFile | Name of the first file to compare. |
| NewFile | Name of the second file to compare. |
[Table 1. Files Compare input variables]

{#r_FilesCompareActivity__table_jkp_pwz_zp}

## Output variables

{#r_FilesCompareActivity__table_ylr_c45_2s__entry__2}

| Output variable | Description |
|-|-|
| contents | File comparison result. This is the difference of the two compared files. |
| result | Either success or failure. |
| return-code | Either 0, if the two files are the same, or 1, if the two files are different. |
| errorMessage | The executionResult.errorMessages from the [Activity designer parsing sources](https://www.servicenow.com/docs/5fX1CXeRKshOet1fu0DglA#r_ActivityDesignerParsingSources "This table lists the parsing sources available with each execution template."). |
[Table 2. Files Compare output variables]

{#r_FilesCompareActivity__table_ylr_c45_2s}

## Conditions

{#r_FilesCompareActivity__table_evp_kmq_rt__entry__2}

| Condition | Description |
|-|-|
| Success | Activity successfully compared the specified files. |
| Failure | Activity could not complare the specified files. |
[Table 3. Files Compare conditions]

{#r_FilesCompareActivity__table_evp_kmq_rt}

*[\>]: and then


