I am wanting to just use one output file while opening 1805 files in 20 different folders. How can this be done? The file method is wp0001.xml, wp0002.xml ... wp1805.xml. The folders are named ch1, ch2, etc. I have the output file working correctly, but I don't understand how to do the input files. I am thinking that I should use a while or do while loop. I am lost on how to direct the script to open every individual file and then once all of the files are opened in the specified folder how to get to the next folder and open all of the files in that folder. Any input would be greatly appreciated.