Replication of source tree 
Author Message
 Replication of source tree

Here is what I am trying to do:

Task:
-----

I have a source tree that is many levels deep and in the lowest level
each subdirectory contains 100 text files.  

I have to read in and perform a task on each one of those files and
then save the new file in a new directory tree which has the same
structure as the first.  

Problem:
--------

My program works within one subdirectory, but I have not figured out how
to
traverse the new directory tree, check to see if a directory exists and
if it doesn't
then create it.

Input:
------

I am getting my input from a find command.  The input looks like this:

./olddir/1/file001.txt
./olddir/1/file002.txt
./olddir/1/file003.txt
.
.
.
./olddir/4/file401.txt
./olddir/4/file402.txt

Output:
------

After a file has been processed it should be stored like so:

./newdir/1/file001.new
./newdir/1/file002.new
./newdir/1/file003.new
.
.
.
./newdir/4/file401.new
./newdir/4/file402.new

Any help with this would really be appreciated.  I am by no means a perl
expert so
I would not be surprised by an easy solution.

Thanks in advance,

Jamie Lagarde

-------------------------------
Jamie Lagarde
Synthesys Technologies

-------------------------------



Sat, 03 Apr 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. substituting strings in source trees?

2. perl/qt or perl/tk : graphical node tree source

3. Seeking Tree::Base or other binary tree module to avoid reinventing the wheel

4. A tree program recursing the directory tree

5. RFC Pod::Tree - tree-based POD parser

6. Needed: Script for file tree delete and file tree move

7. convert a perl tree into a C tree

8. Is there a Tree widget in perlTk that resembles the Tree widget in Tk

9. Output replication inside of DESTROY

10. replication

11. How I got mysql replication going

12. Input File Replication

 

 
Powered by phpBB® Forum Software