The smoothest system I had was when I needed to rename safety data sheets generated by the system used by the company I worked for. These had structure, so I converted them to text with XPDF, made an AWK script that matched the resulting text file, and ran a batch file that used the output to generate a second temporary batch file that did the renaming. Then I could just click on the batch file and have the renaming done automatically. This is, obviously, critically dependent on a particular structure. If I was dealing with incoming files with no consistent structure, I had to use the kind of tools I listed above. I have no idea what structure if any your file have, so I can't be more specific, and in any case I'm not a coder. I just lashed things together. All I can do is give you an idea of what worked for me.