I want to first read csv file then check if the folders exists, if not create a new one. I have information from csv file as follows:
After reading csv file it should create program folder then under program folder it game type sub folder then developer sub folder and game char sub folder. The folder structure should look something like this:
- A380 / Warcraft / 69 / Blizzard / Strategy
- A380 / Overwatch/ 69 / Blizzard / Shooter
- A350 / Skyrim / 51 / Bethesda / Role Playing
So there will be multiple folders inside for example warcraft and overwatch will be two folders inside A380 folder.
So far I have done this:
import os
import csv
output_root = r'/myProgram'
#csv_filename = raw_input('Enter CSV filename:')
with open('insurance_sample.csv') as csvfile:
readCSV = csv.reader(csvfile, delimiter = ';')
header = next(readCSV)
Please let me know if the question is still confusing and I will try to explain in more detail.