Hello, I am creating a script to create new folder hierarchies for a friend of mine. There are around a thousand clients, so a script would save a ton of time. I have everything almost working, the part I don't have is this.
yearList = os.listdir(driveLetter + clientName)
for year in yearList:
os.chdir(year)
os.mkdir('Folder One')
os.mkdir('Folder Two')
os.mkdir('Folder Three')
Under this, are creations for sub folders, like so:
# Create folders under 'Folder One'
os.chdir(driveLetter + clientName + '\\' + year + '\Folder One')
os.mkdir('Sub Folder One')
os.mkdir('Sub Folder Two')
2005 is the first element in the list of yearList. This runs fine for 2005, but I get this error:
WindowsError: [Error 2] The system cannot find the file specified: '2006'
This would really help my friend out, so I am pretty motivated to do it (And pretty[read: very] new to programming)
Thanks for any assistance that can be provided