i am trying to create bulk folders based on simple text file. os.makedir
helps to create new folder but i am not sure how to incorporate with newpath variable along with folder list. following is what i am trying with. I understand that code has syntax error. So need some help to correct/enhance the code.
import os.path
newpath = r'C:\Program Files\test\'
with open('folders.txt') as f:
for line in f:
ff = os.makedirs(newpath,line.strip())
ff.close()