Hi,
I have some binary files that I want to run through vb.net, and have it identify how many instances of a string is located in the file. This is done easily in unix by just using the grep command.
Is there a way to do this in vb.net? I have never processed/opened files in binary mode in vb, and am not sure how to do this.
These are not text file, so I can't use textstream to read, they are strictly binary pdf files. I want to be able to see when the PDF string appears in the binary, and if it occurs more than once.
In vb 6 the code I used is:
Open srcFile For Binary As #1
datarray$ = Input$(lngSize, #1)
workarray$ = datarray$
Close #1
But its very slow, and I am looking for a performance gain in vb.net
What I would also like to do, is split the file anytime there are multiple occurences of PDF. So basically if I have a binary .pdf file that has 2 occurences of the string PDF in the binary, I would split into 2 separate binary pdf files. Any help would be appreciated.
I have some binary files that I want to run through vb.net, and have it identify how many instances of a string is located in the file. This is done easily in unix by just using the grep command.
Is there a way to do this in vb.net? I have never processed/opened files in binary mode in vb, and am not sure how to do this.
These are not text file, so I can't use textstream to read, they are strictly binary pdf files. I want to be able to see when the PDF string appears in the binary, and if it occurs more than once.
In vb 6 the code I used is:
Open srcFile For Binary As #1
datarray$ = Input$(lngSize, #1)
workarray$ = datarray$
Close #1
But its very slow, and I am looking for a performance gain in vb.net
What I would also like to do, is split the file anytime there are multiple occurences of PDF. So basically if I have a binary .pdf file that has 2 occurences of the string PDF in the binary, I would split into 2 separate binary pdf files. Any help would be appreciated.