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
Match Fielname against Binary content - possible?
Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Whoosh.....straight over my head. You might as well be talking in a foreign language.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.
Thanks anyhow.
Found an simple way to do it using AJCgrep.