I am trying to create a number of nested folders in python.
Objective: 1) Ask user for a number (Let us say 3) 2) Create 3 folders. 3) Inside each folder, there should be 3 folders. This nesting should be done 3 times.
Example:
Folder1
Folder1 Folder2 Folder3
Folder1 Folder2 Folder3
Folder1 Folder2 Folder3
Folder2
Folder1 Folder2 Folder3
Folder1 Folder2 Folder3
Folder1 Folder2 Folder3
Folder3
Folder1 Folder2 Folder3
Folder1 Folder2 Folder3
Folder1 Folder2 Folder3
This is my current code:
import os
i = 0
num = 0
while i<17:
num+=1
name="Python"+ str(num)
i+=1
This is only for creating the first set of folders (I have taken 17). Help would be much appreciated.
(I am running Windows)
EDIT:
For a more clearer example : http://s9.postimg.org/sehux992n/20141228_201038.jpg
(Taking 3 as the user input)
From the image, we can see that there are 3 layers.