Match Fielname against Binary content - possible?

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

Post Reply
welby
Posts: 2
Joined: Wed Mar 05, 2008 5:54 am

Match Fielname against Binary content - possible?

Post by welby » Wed Mar 05, 2008 7:16 pm

Hi, let me say first off I am not a programmer, so please be patient with me.

What I would like to do is look at a directory of files and read the filenames before the extension and check to see if it matches a string of characters in that BINARY file.

For example if we have a file called LOOKHERE.FRT I want to first look at the filename LOOKHERE (disregard the extension) and then look inside the binary file and see if the filename LOOKHERE is present in the binary file.

If it's a match DO NOTHING if it's not either CREATE A LIST or ADD CHANGE THE FILE EXTETENSION to *.BAD.

I am told you can do this in Grep for windows, but I haven't got a clue and thought maybe textpipe could do this with ease, but with the bewildering array of features I must admit it looks so daunting to a novice like my self.

Any help or guidance is most welcome.

Thank you

User avatar
DataMystic Support
Site Admin
Posts: 2230
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support » Thu Mar 06, 2008 8:09 am

Hi Welby,

What you need to do is write a windows scrpit (in vbscript or jscript) that iterates over the filenames, and calls TextPipe or grep to search the contents. Based on the exit code you can then trigger a rename or do nothing action.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

welby
Posts: 2
Joined: Wed Mar 05, 2008 5:54 am

Post by welby » Thu Mar 06, 2008 11:18 pm

DataMystic Support wrote:Hi Welby,

What you need to do is write a windows scrpit (in vbscript or jscript) that iterates over the filenames, and calls TextPipe or grep to search the contents. Based on the exit code you can then trigger a rename or do nothing action.
Whoosh.....straight over my head. You might as well be talking in a foreign language.

Thanks anyhow.

Found an simple way to do it using AJCgrep.

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 1 guest