Match Fielname against Binary content - possible?

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, 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 »

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: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support »

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, https://www.DataMystic.com
https://www.JadeDiabetes.com - Insulin dose calculator for Type 1 diabetes
https://www.DownloadPipe.com - 250,000 free software downloads
welby
Posts: 2
Joined: Wed Mar 05, 2008 5:54 am

Post by welby »

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