Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Descending into a folder and...

Status
Not open for further replies.

FreeBASE

Programmer
May 3, 2002
39
US
Can anyone help me...

Basically I have a folder that contains folders with data.
What I am trying to do is descend into each folder (2 levels) and move the contents up (two levels) then conmtinue to the next folder in the list and repeat the same action.

Confused???

Example:
(BEFORE)

Code:
MAIN/
    FOLDER_1/
        FOLDER_A/
           DATA1.TXT
           DATA2.TXT
           DATA3.TXT
        FOLDER_B/
           DATA1.TXT
           DATA2.TXT
           DATA3.TXT
        FOLDER_C/
           DATA1.TXT
           DATA2.TXT
           DATA3.TXT
   FOLDER_2/
        FOLDER_A/
           DATA1.TXT
           DATA2.TXT
           DATA3.TXT
   FOLDER_3/
        FOLDER_A/
           DATA1.TXT
           DATA2.TXT
           DATA3.TXT
        FOLDER_B/
           DATA1.TXT
           DATA2.TXT
           DATA3.TXT

(AFTER)

MAIN/
    FOLDER_1/
        FOLDER_A/

        FOLDER_B/

        FOLDER_C/

   FOLDER_2/
        FOLDER_A/

   FOLDER_3/
        FOLDER_A/

        FOLDER_B/

   DATA1.TXT
   DATA2.TXT
   DATA3.TXT
   DATA1.TXT
   DATA2.TXT
   DATA3.TXT
   DATA1.TXT
   DATA2.TXT
   DATA3.TXT
   DATA1.TXT
   DATA2.TXT
   DATA3.TXT
   DATA1.TXT
   DATA2.TXT
   DATA3.TXT
   DATA1.TXT
   DATA2.TXT
   DATA3.TXT

Thanks in advance...


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top