Just the same comments as the other monks. Please show samples of the input files and of the desired output. And please also show us what you have tried so far, it is usually better to suggest corrections to existing code than to provide a full solution.