Please hel me with file comparison script

Hi All,

I have two files(file1.txt and file2.txt)
and also file names which are presented in the files also present in the directory gdir/db/files.

file1.txt

/db/day_files/data_feed20161231
/db/day_files/data_feed20161229
/db/day_files/data_feed20161125
/db/day_files/data_feed20161118
file2.txt
data_feed20161229
data_feed20161125

Req1 : First we have to check whether the file1.txt and file2.txt files are presented in the directory gdir/db/files or not.
If any of the file is not existed just display the message file1.txt is not existed
(or) file2.txt is not existed (or) file1.txt and file2.txt are not existed.

Req2:Read the file names from file1.txt and compare it against all the names present in the file2.txt file in a loop.
And that loop will run checking one file name at a time.

a. If the file name matches, will move that file to a path gdir/old/files and return value 10 to a variable and will keep running if more file names exist.
b. If the file name does not match in the list it will return value 20 and continue with other.

Please help me.
Thanks in advance.

---------- Post updated at 11:59 AM ---------- Previous update was at 11:03 AM ----------

Hi All,

Could you please help me ASAP.

Thanks,

Bumping up posts is against the rules, as are homework requests, and re-registering after you have been banned for chronic forum misuse.