I have a directory containing about 7k folders. These folders were extracted from zips and some of the extraction was done using Python scripts. Some of these folders are extracted in such a way that
Main Dir
|
---------------
| |
fold1 fold2
| |
------ -------
| | |
.pngs .txts fold2
|
-------
| |
.pngs .txts
The requirement is to move the fold2
category of folders in a directory structure similar to that of fold1
where a folder contains the data instead of another same named folder containing the data.
How may I do it using bash or command line so that I have all 7k folders in a homogeneous structure similar to fold1
?