I am trying to write a script, that will look for folders in the current directory, once found, it will check to see if the folder contains the following folders: 'Contracts' & 'Other Documents', if these are found the folder can be ignored. If not, I need to have the script make these folders.
This is what I have so far:
import os
import sys
folders_to_be_made = ['Contracts', 'Other Documents']
for folder in os.listdir('.'):
if os.path.isdir(folder):
filepath = os.path.join(os.getcwd(), folder)
print filepath
Can anyone please advise on how I would go about creating the folder if missing.
Thank you.