remove unneeded file headers
Posted on 2009-12-29
I have a collection of files, ASCII files (well, MS Wave audio files). They all have a LAME header, but the files are VBR so I can't play them. The LAME header is followed by a standard WAVE file header "RIFF Wavefmt". Many years ago a friend of mine wrote a tool to separate files based on a string delimiter, and I can use it for one file at a time to copy everything that comes after "RIFF" (including "RIFF" string) and paste it in a new file. This way the new file starts from RIFF and ends like the file that started with LAME, so in effect the LAME header was removed and the new file plays no problem. My problem is that I have 830 files, and the tool I have it's a simple GUI one by one file, and it will take me forever to do this one file at a time.
So I'm asking for your help. I need a quick script/CLI program that does the same thing as the tool above, but against a collection of files