Comparing every word of a text file with other

Hi,

I am having two word files.
I am reading those and getting each in a variable ,say - txt1 & txt2.
Now I want to compare each word from txt1 with txt2 . If any does not match, it should be written in a text/word/excel document.

Kindly let me know if any one has solution.
Thanks in advance :slight_smile:

Hi,

may be this would help.

  1. split txt1 and txt2 variable into array of each word eg. txt1.split(’ ')
  2. For each (x) in txt1(1) to txt1.count
  3. For each (y) in txt2(2) to txt2.count
    
  4.        if txt(x) != txt(y) then append to list
    
  5.   next y
    
  6. next x
1 Like

Hi @arifelahi,
Thanks for your response. It would be more clear if u can explain it in detail. I am not much familiar with String Manipulations.

@Liveasurheartsay

image

create a variable Var1 of System.string

Assign activity will store all the words in Var1. Then use foreach loop on Var1.

If still not clear, reply i will create a simple workflow

Thanks
Arif Elahi