B
Bryan
Hi,
I have a directory structure like this:
/data/exp/file1/file1.xml
/data/exp/file2/file2.xml
/data/exp/file3/file3.xml
/data/file1/file1.xml
/data/cust/exp/file1/file1.xml
I need to read in the xml files, do some processing on them, and then
output them to an identical directory structure, but with a different
root name, like this:
/data_out/exp/file1/file1.xml
/data_out/exp/file2/file2.xml
/data_out/exp/file3/file3.xml
/data_out/file1/file1.xml
/data_out/cust/exp/file1/file1.xml
If the folders at each level do not exist, I would need to create them
(assuming the xml processing passes some validation check). So if one
file fails, it would just skip the creation of that directory.
What is the best way to read in the directory tree, and then recreate it?
Thanks,
B
I have a directory structure like this:
/data/exp/file1/file1.xml
/data/exp/file2/file2.xml
/data/exp/file3/file3.xml
/data/file1/file1.xml
/data/cust/exp/file1/file1.xml
I need to read in the xml files, do some processing on them, and then
output them to an identical directory structure, but with a different
root name, like this:
/data_out/exp/file1/file1.xml
/data_out/exp/file2/file2.xml
/data_out/exp/file3/file3.xml
/data_out/file1/file1.xml
/data_out/cust/exp/file1/file1.xml
If the folders at each level do not exist, I would need to create them
(assuming the xml processing passes some validation check). So if one
file fails, it would just skip the creation of that directory.
What is the best way to read in the directory tree, and then recreate it?
Thanks,
B