Visual Basic comparing two .txt documents

Laura Brody laura at hvcomputer.com
Thu Dec 6 19:40:46 PST 2007


Quoting Mike Fedkiw <filepro at adelphia.net>:

> I am asking this here because it seems like a lot of you do more   
> then filepro.
>
> I have an inventory file (invy.txt) with about 22,000 records in it.  
>  each line in the (invy.txt) file contains data like the following.   
> (VEND   UPC#   MFG#   DESCRIPTION  ETC...). I have another file that  
>  is just a list of image names with about 12000 items in it   
> "images.txt". looks like this (VEN_UPC.JPG) example= "pen_55555.jpg".
>
>  The programmer I hired to do this is attempting to build arrays for  
>  each letter in the alphabet on the (vend_upc) and load in the   
> appropriate records from my invy.txt file. He is then looking into   
> the array that matches the first letter of the image we are looking   
> for from my (images.txt) file.
>
> It is not very fast. I know nothing about visual basic programming   
> but there has to be a faster way.  I have seen something about text   
> searches that say they index the text file somehow.
>
> Any help is always appreciated

   How about using a GNU grep utility?

<http://gnuwin32.sourceforge.net/packages/grep.htm>

   Or maybe GNU diff?

<http://gnuwin32.sourceforge.net/packages/diffutils.htm>

Download it, install, give it a couple of command line
flags for how you want the output, and run it. Done.
They are free, fast and some other guy spent the time
to write them. My kind of solution.

-- 
Laura Brody
+------------- Hudson Valley Computer Associates, Inc ----------+
| PO Box 859 120 Sixth Street    http://www.hvcomputer.com      |
| Verplanck, NY 10596-0859       Voice mail: (914) 739-5004     |
+------ PC repair locally, filePro programming globally --------+


More information about the Filepro-list mailing list