Multiple Folders/Files

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.

Comments

  • : 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.
    :


    depending on the operating system, use FindFirstFile() and FindNextFile() (MS-Windows) or opendir() and readir() on *nix. Don't know about MAC or other operating systems. There are boost c++ file system classes that will make this more portable between operating systems. However you do it, it will give you a list of the files and folders in the specified folder.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion