1

I have two text files, lets's say A.txt and B.txt. I'm using Microsoft Windows as my OS

i want to retrieve one entry from A.txt file, lets say one line, that line has a word. let's say dog.

now i want to find the word dog in B.txt file and remove that entry from B.txt file.

i want to achieve this using a bat file.

any help, ideas, tutorial link to achieve this task?

--regards, rangana

PS. i have already done the other parts using bat file, i'm stuck in this part. appreciate your help.

Rangana Sampath
  • 1,447
  • 3
  • 32
  • 57
  • 1
    Do you want to do it for 1 line only or for every line? If it's the latter, this should help you: http://stackoverflow.com/a/11479465/1123692 – wmz Oct 12 '12 at 13:13
  • hi wmz, thanx for the reply, it helped me to figure out the finding part, bud the replacing part is a problem now. i have key value pair kind of scenario. i have used you link to compare the keys and got the repeating keys, now i have to find those keys and remove from values. any idea about that? thanx – Rangana Sampath Oct 15 '12 at 05:53
  • I'm not sure I understand your requirement. The answer I linked does set substraction (`B'=B\A`) and I thought it's what you're after too. Maybe you could include an example of both files (few lines each) and expected result? – wmz Oct 15 '12 at 09:58

0 Answers0