# Compare two files

**URL:** <https://community.automationedge.com/t/compare-two-files/2112>\
**Category:** Get Help & Discuss\
**Tags:** rpa\
**Created:** [May 15, 2020, 11:09am UTC](https://community.automationedge.com/t/compare-two-files/2112 "2020-05-15T11:09:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnkitaPuri](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@AnkitaPuri](https://community.automationedge.com/u/AnkitaPuri)\
**Post date:** [May 15, 2020, 11:09am UTC](https://community.automationedge.com/t/compare-two-files/2112/1 "2020-05-15T11:09:23Z")

</div>

How to compare two files in PS.

---

<div class="post-metadata">

**Author:** ![BhagyashriC](https://avatars.discourse-cdn.com/v4/letter/b/a8b319/32.png) [@BhagyashriC](https://community.automationedge.com/u/BhagyashriC)\
**Post date:** [May 15, 2020, 1:46pm UTC](https://community.automationedge.com/t/compare-two-files/2112/2 "2020-05-15T13:46:09Z")

</div>

Which type of file and in which scenario, you want to compare?

---

<div class="post-metadata">

**Author:** ![AnkitaPuri](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@AnkitaPuri](https://community.automationedge.com/u/AnkitaPuri)\
**Post date:** [May 15, 2020, 2:37pm UTC](https://community.automationedge.com/t/compare-two-files/2112/3 "2020-05-15T14:37:34Z")

</div>

I have two excel files, one is newly created file and another is old file with same fields, I want to compare this newly created file with old file and update new details in old file.

---

<div class="post-metadata">

**Author:** ![BhagyashriC](https://avatars.discourse-cdn.com/v4/letter/b/a8b319/32.png) [@BhagyashriC](https://community.automationedge.com/u/BhagyashriC)\
**Post date:** [May 16, 2020, 6:16am UTC](https://community.automationedge.com/t/compare-two-files/2112/4 "2020-05-16T06:16:33Z")

</div>

If headers are same then, it has one unique column in it, So

1. Take two input excel steps for old and new file.
2. Sort steps for sorting the unique column.
3. After sorting with the help of merge join, get matching columns and update remaining data in new file.

---

<div class="post-metadata">

**Author:** ![AnkitaPuri](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@AnkitaPuri](https://community.automationedge.com/u/AnkitaPuri)\
**Post date:** [May 17, 2020, 7:08am UTC](https://community.automationedge.com/t/compare-two-files/2112/5 "2020-05-17T07:08:38Z")

</div>

Thanks Bhagyashri.
