I have an old directory-tree-file created using find . -type d >old.txt
. Now I want to rename an existing tree that has the same exact structure to mach the old tree. This question is related to this
In other words: How can I convert the following:
NEW
├── 01
├── 02
├── 03
│ ├── 031
│ └── 032
│ └── 0321
| └── 03211
├── 04
├── 041
└── 042
back to this:
OLD
├── Mercury
├── Venus
├── Earth
│ ├── Australia
│ └── Asia
│ └── Japan
| └── Hokkido
├── Mars
├── HellasBasin
└── SyrtisCrater
using my old.txt (directory-tree), or using some other script without touching any files in the directories?