VBScript to file compare

5 pts.
Tags:
VB
VBScript
Visual Basic
Visual Basic Script
Is there a way to make a VBScript that will get a word from FileA.txt and look for it in FileB.txt. If the word(not the whole line) is found in FileB.txt, then write it in FileC.txt. 
?

Answer Wiki

Thanks. We'll let you know when a new response is added.

VBScript has a Regular Expression object that can be used find various text based on pattern matching.

If you need to see a working usage example checkout some code I have posted on my site @ <a href=”http://www.code-bytes.com/Automate_WSH_VBScript_To_Delete_Or_Archive_Files.htm”> http://www.code-bytes.com/Automate_WSH_VBScript_To_Delete_Or_Archive_Files.htm</a>

Note the code uses regular expressions for matching file names…. but it will work the same if you pass in the text in the file.

I also have some references to Microsoft Regular Expression Syntax and Tool posted in my forum @ <a href=”http://www.code-bytes.com/Forum/index.php/board,4.0.html”>http://www.code-bytes.com/Forum/index.php/board,4.0.html</a>

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following