I want to create a subdirectory contains all directories and files in the parent directory.
For example: There exists a parent directory and its subdirectories and files.
/parent
/parent/child1
/parent/child1/a.txt
/parent/child1/b.txt
/parent/child2
/parent/child2/child2-1
/parent/child2/child2-1/c.txt
/parent/child2/child2/d.txt
/parent/e.txt
My Target: Create a subdirectory called "new" that contains all directories and files in the parent directory.:
/parent
/parent/new
/parent/new/child1
/parent/new/child1/a.txt
/parent/new/child1/b.txt
/parent/new/child2
/parent/new/child2/child2-1
/parent/new/child2/child2-1/c.txt
/parent/new/child2/child2/d.txt
/parent/new/e.txt
Is there a Pythonic way to meet my needs?
Thanks!