Hi Dw.

I'm using this code available from here and I have changed it from keeping the hashs on a variable(array) to writing it on a file. Now what I want to do is to read this file.

Basically I'm scanning through all my drive file and for each file I hash it and its hash code I save it on a text file on its own line and I have a special separator then a file name. So what I want to do is to read through the text file and get the names and on each file I chech if it does exist on the text file and then read the hash to a variable then hash the file again now I hash to only see if the file has ben modified or not. but the problem is that I don't know how will I convert the hash read from text file line because it is read as a string so it can't compare a byte to a text.

any Idea how I could solve this.

You don't indicate what hash algorithm(s) you are using. Most generate hash values as hexadecimal strings which you should be able to compare. I'm sure VB.net supports md5 as well as sha256 algorithms. md5 is much faster and is generally good for this purpose. sha256 is more commonly used for crypto systems and for signing program packages and source code to detect hacking.

My program is exactly the same as that on the link, but instead of keeping the hash's in a variable I log it(write it on a file on each line)

The line is in this format:

Hash_here Separator File_Name

The article starter has earned a lot of community kudos, and such articles offer a bounty for quality replies.