-
Notifications
You must be signed in to change notification settings - Fork 108
/
FoldersCreation.py
33 lines (22 loc) · 998 Bytes
/
FoldersCreation.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Importing the Libraries Required
import os
import string
# Creating the directory Structure
if not os.path.exists("dataSet"):
os.makedirs("dataSet")
if not os.path.exists("dataSet/trainingData"):
os.makedirs("dataSet/trainingData")
if not os.path.exists("dataSet/testingData"):
os.makedirs("dataSet/testingData")
# Making folder 0 (i.e blank) in the training and testing data folders respectively
for i in range(0):
if not os.path.exists("dataSet/trainingData/" + str(i)):
os.makedirs("dataSet/trainingData/" + str(i))
if not os.path.exists("dataSet/testingData/" + str(i)):
os.makedirs("dataSet/testingData/" + str(i))
# Making Folders from A to Z in the training and testing data folders respectively
for i in string.ascii_uppercase:
if not os.path.exists("dataSet/trainingData/" + i):
os.makedirs("dataSet/trainingData/" + i)
if not os.path.exists("dataSet/testingData/" + i):
os.makedirs("dataSet/testingData/" + i)