How can I do this recursively for all the directories? For example, I have directories named 1, 2, 3, 4... And in each of them I have a different directory structure inside. What I want is to copy the directories named 1,2,3,4... but in the target I do not want to have the directory structure for each of the individual directories. So the target should have a directory named 1, but inside it it should only be files (recursively found from source directory 1) but no directories. I want this to be repeated for all directories 1,2,3,4... Is there a way to get it done?