Visual Basic comparing two .txt documents

Mike Fedkiw filepro at adelphia.net
Thu Dec 6 21:39:10 PST 2007


I have an ordering program for my customers to use. They download it from my 
web site. What I am trying to do is have the ordering program match a list 
of images on a web site to their inventory file on their computer and 
download any images they are missing. Everything is set to go but the 
comparing of the two files just takes too long.

I don't want to give them any more programs they have to install for this to 
work. Whatever I use has to be part of the initial program install and 
hopefully not need a DOS window to run in.



----- Original Message ----- 
From: "Laura Brody" <laura at hvcomputer.com>
To: <filepro-list at lists.celestial.com>
Sent: Thursday, December 06, 2007 10:40 PM
Subject: Re: Visual Basic comparing two .txt documents


> 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 --------+
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
> 




More information about the Filepro-list mailing list