![]() |
How do I compare 2 text files? - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: How do I compare 2 text files? (/Thread-How-do-I-compare-2-text-files) |
How do I compare 2 text files? - avanthika - 12-09-2011 I need to compare and validate 2 reports(text file). The reports need to be called from locations and then compare both of them and the difference needs to be reported as result. Let me know the possible ways for this. Or what can I do. I have QTP 11 , windows 7, ie 8 Thank you Avanthika RE: How do I compare 2 text files? - sshukla12 - 12-09-2011 Might be helpful to you. Code: Public Function CompareFiles (FilePath1, FilePath2) Regards, Sankalp RE: How do I compare 2 text files? - avanthika - 12-09-2011 For this I am getting the syntax error when I try to run this in test. Please help. Thank you avanthika RE: How do I compare 2 text files? - avanthika - 12-10-2011 Thank you for the script. I am successful in running the script mentioned above. Can I report the difference between the 2 files as Result line by line. Please help. Thanks Avanthika RE: How do I compare 2 text files? - Arul - 12-10-2011 Hi, Code: Set FS = CreateObject("Scripting.FileSystemObject") Thanks, Arul |