I'm trying to create a directory structure of years containing sub-directories representing months, ie.
- 2012
- 01
- 02
- 03
My code is like this:
newpath = "test"
for year in range(2000, 2013):
for month in range(1, 13):
newpath += str(year)+'\\'+str(month)
if not os.path.exists(newpath):
os.makedirs(newpath)
I am getting an error
OSError: [Errno 2] No such file or directory: 'test\\2000\\1
Would someone please have some information on this Thank you